I have just started using JQuery, and i know you can use .click with a class but can you use .click using id as the trigger ? I have had a look around but i can’t find any information on triggers.
I have just started using JQuery, and i know you can use .click with
Share
Use id with click, but try using .live() (for jquery version < 1.7.1) and .on() (> jquery version 1.7.1) as it’ll bind matching elements after the page is loaded.
so use.
or
depending on your jquery version