The Scarecrow Posted February 19, 2014 Share Posted February 19, 2014 I have a page that i have both of these items working. However I can not make normal links on the page without it being a Javascript call for example <a href=##">Dog</a>. I have traced the problem to my Jquery call (see below) anyone know how to fix it? thanks. (function($){ // Code that uses jQuery's $ can follow here. $(document).ready( function(){ $("a").click(function(event){ $(".hideMe").hide("slow"); event.preventDefault(); }); // Coin slider $('#coin-slider').coinslider({ width: 960, navigation: false, delay: 5000 }); }); })(jQuery); Link to comment Share on other sites More sharing options...
0 Seahorsepip Veteran Posted February 19, 2014 Veteran Share Posted February 19, 2014 Might be just messy document ready method: $(function() { $("a").click(function(){ //No need to use "function(event)" here $(".hideMe").hide(); //hide("slow") doesn't exist, it's just hide() or show() event.preventDefault(); }); $('#coin-slider').coinslider({ width: 960, navigation: false, delay: 5000 }); }); Link to comment Share on other sites More sharing options...
0 The Scarecrow Posted February 19, 2014 Author Share Posted February 19, 2014 I thought that too but the lightwindow works but the coin slider does not. Link to comment Share on other sites More sharing options...
0 Seahorsepip Veteran Posted February 19, 2014 Veteran Share Posted February 19, 2014 Did you make sure the coinslider js file itself is included? Also check the console for any js errors. Link to comment Share on other sites More sharing options...
0 The Scarecrow Posted February 19, 2014 Author Share Posted February 19, 2014 Yes. Here is my code <!-- CSS --> <link rel="stylesheet" type="text/css" href="lightwindow/css/lightwindow.css" /> <link rel="stylesheet" href="coin-slider/coin-slider-styles.css" type="text/css" /> <!-- Libraries--> <script type="text/javascript" src="coin-slider/jquery-1.7.2.js"></script> <script type="text/javascript" src="lightwindow/javascript/prototype.js"></script> <!-- required scripts --> <script type="text/javascript" src="coin-slider/coin-slider.min.js"></script> <script type="text/javascript" src="lightwindow/javascript/effects.js"></script> <script type="text/javascript" src="lightwindow/javascript/lightwindow.js"></script> <!-- init script --> <script> $(function() { $("a").click(function(){ //No need to use "function(event)" here $(".hideMe").hide(); //hide("slow") doesn't exist, it's just hide() or show() event.preventDefault(); }); $('#coin-slider').coinslider({ width: 960, navigation: false, delay: 5000 }); }); </script> <script> function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } </script> Link to comment Share on other sites More sharing options...
0 Seahorsepip Veteran Posted February 19, 2014 Veteran Share Posted February 19, 2014 Try putting: <script> $(function() { $("a").click(function(){ //No need to use "function(event)" here $(".hideMe").hide(); //hide("slow") doesn't exist, it's just hide() or show() event.preventDefault(); }); $('#coin-slider').coinslider({ width: 960, navigation: false, delay: 5000 }); }); </script> In the footer. Link to comment Share on other sites More sharing options...
0 The Scarecrow Posted February 19, 2014 Author Share Posted February 19, 2014 Nope still the same result. Would it help with the entire code for the page? Link to comment Share on other sites More sharing options...
0 Seahorsepip Veteran Posted February 19, 2014 Veteran Share Posted February 19, 2014 Yeah a link to the page would be great Link to comment Share on other sites More sharing options...
Question
The Scarecrow
I have a page that i have both of these items working. However I can not make normal links on the page without it being a Javascript call for example
<a href=##">Dog</a>. I have traced the problem to my Jquery call (see below) anyone know how to fix it? thanks.
Link to comment
Share on other sites
7 answers to this question
Recommended Posts