[jQuery] Re: objects with unknown class or id

2008-08-22 Thread Michael Geary
Glad to help, Shao. Yes, that is one of the most confusing things when you switch from Prototype to jQuery - they use the same function name for two very different things (even though they are very similar in concept). -Mike > From: Shao Kang Tat > > Hi Mike, > > Thanks for the explanation. T

[jQuery] Re: objects with unknown class or id

2008-08-22 Thread Shao Kang Tat
Hi Mike, Thanks for the explanation. That clears up a lot of questions I had, especially the part about the $ and it's relationship to the DOM elements. I guess I assumed I was getting a DOM element back because I have been using Prototype for so long, that it's kinda of what I expected to get o

[jQuery] Re: objects with unknown class or id

2008-08-22 Thread Michael Geary
So the original code you posted was different from the actual code, eh? No wonder I couldn't see what the problem was! ;-) This is why people always recommend posting a link to a test page, not a code snippet. And especially not a modified code snippet that is "similar" to the actual code but lea

[jQuery] Re: objects with unknown class or id

2008-08-22 Thread Shao Kang Tat
Actually one thing is solved, it's because when I was using Prototype, the call was onclick="someFunction({src:$('someID'), otherParams:}); for jQuery it had to be modified to be passed in as $('#someID'), so now the function on the receiving end works with obj.attr("class") etc...however d

[jQuery] Re: objects with unknown class or id

2008-08-22 Thread Michael Geary
Merely including jQuery in your page shouldn't interfere with your inline event handlers at all. I combine them all the time. If you call someFunction() from an onclick="...", it should work just the same as before. Can you post a test page that illustrates the problem? There must be something el