I want one script to have multiple events (jQuery), based on what event is triggered it will load up different content on the same div. Does that make sense or do I have to have multiple ID's ?
Siberian 13 Junior Poster
Recommended Answers
Jump to Postpost some code
Yep.
Help us to help you - although for PHP, this thread has some very good advice:
http://www.daniweb.com/web-development/php/threads/435023/read-this-before-posting-a-question
Jump to Post$('#anchor, #anchor2, #anchor3').click(function(){ ... });
When you say multiple events - do you mean one method, but multiple targets?
$('#anchor, #anchor2, #anchor3').click(function(){ ... }).hide('fast');
That's an example of chaining methods
Jump to PostWTF? Please articulate your needs clearly, you're not making any sense.
Jump to PostI have one question, does it work in the order of the chain, for example #anchor1 is associated with .click, #anchor2 is associated with .dbleclick etc ?
No
Thanks AndrisP that is what I meant.
I thought I'd already given that example...
$('#anchor, …
Jump to PostThanks. Sorry for the confusion regarding this question !
heh heh - don't worry, I'm used to it :)
All 22 Replies
JorgeM 958 Problem Solver Team Colleague Featured Poster
Siberian 13 Junior Poster
jstfsklh211 79 Light Poster
Siberian 13 Junior Poster
jstfsklh211 79 Light Poster

diafol
Siberian 13 Junior Poster

diafol
Siberian 13 Junior Poster
Siberian 13 Junior Poster
Siberian 13 Junior Poster

diafol
AndrisP 193 Posting Pro in Training
Siberian 13 Junior Poster

diafol
Siberian 13 Junior Poster

diafol
Siberian 13 Junior Poster
JorgeM 958 Problem Solver Team Colleague Featured Poster
Siberian 13 Junior Poster
JorgeM 958 Problem Solver Team Colleague Featured Poster
Siberian 13 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.