Conditionally disable a link

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • burtonfigg
    New Member
    • Mar 2008
    • 32

    Conditionally disable a link

    I have a very simple bit of ajax with next / prev links on it (thanks to acoder who helped a lot with getting it to work):

    Use the jimpix username generator to create unique and memorable usernames for Instagram, Twitter, Youtube and popular social media sites


    If I am at the start of the range, is there any way to disable the 'prev' link, and likewise, can I disable the 'next' link if I'm at the end of the range?

    I can pass something back in the script page to say if it's at the start / end of the range, so could I do some kind of if statement check in the JS, so that if the start / end conditions were met, the next / prev l inks were disabled?

    Thanks for any assistance.
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you could simply replace the link with a plain textelement then or a span or similar node

    kind regards

    Comment

    Working...