Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2008
    Posts
    117
    Thanks
    14
    Thanked 0 Times in 0 Posts

    jQuery slideshow: what it means with a '?' and ':' in the line

    Hi,
    I got this code from elsewhere online, but i dont understand what this line mean,

    Code:
    var nextslide =  currentslide.next().length ? currentslide.next() : $('#supersize :first');
    what does it mean with a '?' and ':' in the line above?

    Below is the full code,

    Code:
    function theslideshow() {
        
        var currentslide = $('#supersize .activeslide');
        		
        if ( currentslide.length == 0 ) currentslide = $('#supersize :last');
    		
        var nextslide =  currentslide.next().length ? currentslide.next() : $('#supersize :first');
    		
        nextslide.addClass('activeslide');
        currentslide.removeClass('activeslide');
    
    }
    Many thanks,
    Lau

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts

  • #3
    Regular Coder
    Join Date
    Dec 2008
    Posts
    117
    Thanks
    14
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by adios View Post
    thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •