why is my toggle function working on this jsfiddle but not my site?
Here is the JS Fiddle: http://jsfiddle.net/timur/bMfdD/4/ Here is the website: http://www.blindsdetroit.com/testing
<a id="clickMe" href="#">Type of Worker</a> <div id="clickEvent" class="hide"> <ul> <li>Rivermen</li> <li>Boatmen</li> <li>stuff</li> </ul> </div>
Here is the jquery
$('#clickMe').click(function() { $("#clickEvent").fadeToggle("slow"); });
here is the css
.hide { display:none; }
Wrap your code in .ready() so that it will run once the DOM is loaded
.ready()
$(document).ready(function(){ $('#clickMe').click(function() { $("#clickEvent").fadeToggle("slow"); }); });
or put your JS file before body ends
JS
ends
1.4m articles
1.4m replys
5 comments
57.0k users