Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Dec 2008
    Posts
    483
    Member #
    17875
    Liked
    1 times
    Hi.
    Here is my MARKUP

    <a rel="lightboxPC" href=""><img src="images/postcards/sm/bande01.jpg" id="img1" alt="" /><input name="pcPicture" type="radio" class="center" value="1" checked="checked"/></a>

    And here is what im trying to do

    $("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {
    $(this).attr('href', $(this).next('img').attr('src'));
    return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
    });

    Basically, im trying to set the href of the link to the src of the next image. This image may change based on a radio button selection.
    Basically they pick a radio button that selects the theme, which changes these images, so i cant hardcode the image link into <a rel="lightbox" href="imgLink">

    What am i doing wrong?

  2.  

  3. #2
    Senior Member
    Join Date
    Dec 2008
    Posts
    483
    Member #
    17875
    Liked
    1 times
    alert($(this).attr('href')); //this returns the proper value
    alert($(this).next('img').attr('src')); //this doesnt seem like im using the proper selector, it returns undefined

    $(this).next().attr('src') //this returns undefined too


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:15 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com