Jquery fadein and fadeout

Hello so what my problem is whenever i put my code so there would be two buttons for two different elements so when button 1 is clicked the section for button 1 will appear/fadein and button 2’s section will dissapear/fadeout I have some code but i just dont know why it isnt working ? any suggestions

Code >>> http://jsbin.com/mabeyebake/edit?html,js,output

Hi, you have a couple of problems with your code:

  1. You need to include the jQuery library
  2. You need to make sure your jQuery selectors match the IDs that you’ve assigned to the divs - one div has the id ‘prayhelp’ in the markup, but ‘prayerhelp’ in your JavaScript.

http://jsbin.com/mabeyebake/edit?html,js,output [Updated Code] @fretburner

You’ve still got problems with inconsistent IDs, but you also need to make sure that you include jQuery before your own code, otherwise it won’t work. Also your html isn’t valid at the moment, because your <script> tags are outside the <body> tags. The best place to include JS is just before the closing </body> tag.

Here’s a working version of the page: http://jsbin.com/gagivibewo/1/edit?html,output

@fretburner I updated my code here it is http://jsbin.com/mabeyebake/edit?html,js,output I dont know what it is

@fretburner

Sorry, for some reason the JS Bin I made last time didn’t save. Try this one: http://jsbin.com/loyetejifu/edit?html,output

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.