The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Disable jquery code on only one link, by id:

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #200541


    I’m trying to get this page transition with jquery to work.

    It’s all set, & I would like it to work on all links except one. (That link is to an id on the same page that triggers another js event.) So when the viewer clicks the link I don’t want the page to fade out.

    Here’s what I have so far:

    What do I need to add to the jQuery code such that it doesn’t trigger the page fade out– but only on certain links. All other links should trigger the page fade out.

    (Most links should trigger the page fade out, so I want to specify the ones that don’t, rather the ones that do.)

    Thank you for any help!



    If you don’t want the function to apply to a class of links (since you can’t re-use IDs) then use that class but negate it..

    jQuery("a").not(".notransition"). etc

    If you truly will only use this on a single link…substitute in the ID

    jQuery("a").not("#notransition"). etc

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.