i have a website where i want to load this jquery from http://jsfiddle.net/lew1s/ewY6a/ on this website http://projects.qbf.ie/bdmacmahon/team/ but doesnt load the jquery at all. i added these in to header: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> can you help me please ?
Using developer tools on chrome it throws the following error: try fixing that first then see what happens.
i fixed it and stil the same. the jquery doesnt load on the wordpress site. i addded in to header ? do i have to add in functions .php?
It's not fine, if you're not using it remove the link to it in the header. you are also loading jquery twice, which is the probable cause of your issue. once on line 12, and again on line 51
is this correct ? <script> $( $('.interactable').click( function() { $('.toggle').css('display', 'none'); var clickedLink = $(this); $('#div'+clickedLink.data('id')).css('display', 'block'); } ) ); </script >
Developer tools is now showing I noticed you also also removed the jqueryui file, Try adding it back in and see what happens, <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script> Code (markup): add it after the jquery file on line 51
Look in the developer console. The error is staring you in the face (Uncaught ReferenceError: $ is not defined). It's an easy one to find in Google.
also this code should be added after the html code, before the closing </body> tag <script> $( $('.interactable').click( function() { $('.toggle').css('display', 'none'); var clickedLink = $(this); $('#div'+clickedLink.data('id')).css('display', 'block'); } ) ); </script > Code (markup):
solved <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> $(document).ready(function() { // The below code was simply take from your provided example. $('.interactable').click(function() { $('.toggle').css('display', 'none'); var clickedLink = $(this); $('#div'+clickedLink.data('id')).css('display', 'block'); } ); });