• 0

Coin-Slider & LightWindow Conflict


Question

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

7 answers to this question

Recommended Posts

  • 0

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

  • 0

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

  • 0

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

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.