Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default a jquery question

    If you know anything about Jquery you may just be able to help here...

    I'm currently using Jquery to bring up products in a lightbox on rolling over them on the product_listing page - this works well.. however the technique that I'm using requires that the <a href> tag is referenced to the image brought up in the lightbox - e.g.

    Code:
    <a href="images/1_MED.jpg" class="preview"><img src="images/1.jpg" alt="gallery thumbnail" /></a>
    .. this of course means that clicking on that image's thumbnail will take you to the URL of the image rather than it's product_info page as I need.

    Does anyone understand this problem and have any suggestions?? - I've already tried to put an onmousedown link in there but it only occasionally overrides the <a href> link tag - any help is highly appreciated!

    _thanks

  2. #2
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: a jquery question

    You should bind the click event to those href and return false; to prevent the "click" event to take the users to the images.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #3
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default Re: a jquery question

    this sounds like good advice - any idea how?

    _thanks

  4. #4
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: a jquery question

    example
    $('a.preview').live('click', function(){return false;});
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  5. #5
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default Re: a jquery question

    Thanks for the response..

    I attempted to put this into my js file but it didn't help - am I putting it in the wrong place and will it allow a link to the individual product info page??

    _thanks

  6. #6
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: a jquery question

    Again, the code is for example. If you want the user to be redirected to the product info page then obviously the href needs to be that link, and hence you will need to change the logic of the lightbox a bit because right now you are using href for the image path.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  7. #7
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default Re: a jquery question

    Oh thanks... but you indicated that it could be done: -

    You should bind the click event to those href and return false; to prevent the "click" event to take the users to the images.
    and I'm not sure what the example was for if not to show me how it could be done:

    example
    $('a.preview').live('click', function(){return false;});
    I've been told that almost anything can be done in javascript so I'm still hoping there is a way to redirect the link with the simple method that I'm using for the lightbox. Any further suggestions or comments are welcome as these have been.

    _thanks

  8. #8
    Join Date
    Feb 2009
    Posts
    354
    Plugin Contributions
    0

    Default Re: a jquery question

    I should thank you as this is what actually prevented the mouseclick:

    Code:
    $('a.preview').click(function(){return false;});
    ..now I just need to redirect it to the individual product_info page.. any thoughts on this could definitely help!! <<

    _thanks

 

 

Similar Threads

  1. v139h Jquery
    By AmyS in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Sep 2012, 09:21 PM
  2. JQuery Calculation
    By jazzman2 in forum General Questions
    Replies: 2
    Last Post: 9 Jan 2012, 01:52 AM
  3. Jquery?
    By cpdantha in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 16 Feb 2011, 04:04 PM
  4. CSS Border Question and Jquery Rotator
    By ctrujillo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 18 Jan 2011, 11:33 PM
  5. A jQuery question
    By damiantaylor in forum General Questions
    Replies: 5
    Last Post: 8 May 2010, 08:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR