SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast Angrypoonani's Avatar
    Join Date
    Mar 2011
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery .show() & .hide() problems

    I am unable to post the code at the moment but I will have it here tomorrow.

    Basically I coded a jQuery film strip that visitors can navigate through using two arrows on either side of the pictures. I have it coded so that when the end of the strip is reached the arrow of that side hides ( $('#rightArrow').hide() - this will cause the id to have a display: none; property) and when a user scrolls back the arrow will reappear using show().

    This is coded for both arrows left and right but for some reason the code will not make the 'display: none;' change back to 'display: block;' when I look at the debug in firefox. I know the code it firing because the right arrow is hidden when the last slide is reached but I cannot get the left arrow to show.... Only tested on firefox and chrome with the same result.
    jQuery ver. 1.6.2
    Updated Chrome and FF

    Any suggestions or guesses are appreciated until I can get the code up tomorrow morning.

  2. #2
    SitePoint Enthusiast Angrypoonani's Avatar
    Join Date
    Mar 2011
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Angrypoonani View Post
    I am unable to post the code at the moment but I will have it here tomorrow.

    Basically I coded a jQuery film strip that visitors can navigate through using two arrows on either side of the pictures. I have it coded so that when the end of the strip is reached the arrow of that side hides ( $('#rightArrow').hide() - this will cause the id to have a display: none; property) and when a user scrolls back the arrow will reappear using show().

    This is coded for both arrows left and right but for some reason the code will not make the 'display: none;' change back to 'display: block;' when I look at the debug in firefox. I know the code it firing because the right arrow is hidden when the last slide is reached but I cannot get the left arrow to show.... Only tested on firefox and chrome with the same result.
    jQuery ver. 1.6.2
    Updated Chrome and FF

    Any suggestions or guesses are appreciated until I can get the code up tomorrow morning.
    You know you've been looking at code for too long when you miss the 'id' symbol before declaring an id... Problem solved by placing the '#' symbol in front of my selector.show()

    I had:
    Code:
    ('leftArrow').show()
    When I needed:
    Code:
    ('#leftArrow').show()


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
  •