Sign in to follow this  

Coin-Slider & LightWindow Conflict

Recommended Posts

The Scarecrow    3

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);

Share this post


Link to post
Share on other sites
Seahorsepip    542

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
           });
 });

Share this post


Link to post
Share on other sites
The Scarecrow    3

I thought that too but the lightwindow works but the coin slider does not.

Share this post


Link to post
Share on other sites
Seahorsepip    542

Did you make sure the coinslider js file itself is included?

Also check the console for any js errors.

Share this post


Link to post
Share on other sites
The Scarecrow    3

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>

Share this post


Link to post
Share on other sites
Seahorsepip    542

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.

Share this post


Link to post
Share on other sites
The Scarecrow    3

Nope still the same result.  Would it help with the entire code for the page?

Share this post


Link to post
Share on other sites
Seahorsepip    542

Yeah a link to the page would be great

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.