[jQuery] Re: Is it possible to select on multiple attribute values?

2009-04-27 Thread machineghost
Thanks all for the great suggestions! I think I'm going to use George's solution for now (it's easy, if slightly verbose), but when I have a free moment I'm going to follow mkmanning's advice and look in to making a custom selector. Jeremy On Apr 26, 12:03 pm, George Adamson wrote: > > so the

[jQuery] Is it possible to select on multiple attribute values?

2009-04-24 Thread machineghost
Hello, I already know that you can combine multiple attribute selectors, &&- style, by doing: $("*[name='someName'][value='someValue']"); However, what I was wondering is, is there any way to combine multiple attribute selectors, ||-style, such that I could select: $("*[name='someName'][value='s

[jQuery] Re: Stupid question: what is the return value of replaceWith good for?

2008-12-04 Thread machineghost
r $myDiv = $('my div'); > $(someHtmlElement).replaceWith($myDiv); > $myDiv.click( function() { alert( $(this).html() ); } ); > > -Mike > > > From: machineghost > > > While I love most things in jQuery, one thing I don't get is > > replaceWith.

[jQuery] Re: Stupid question: what is the return value of replaceWith good for?

2008-12-04 Thread machineghost
Aha! Thank you, that was something I totally didn't consider (moving the replaced element somewhere else_. It still seems to me that you're more likely to want to do something (like say, hookup events) to the replaced element than you are to append the replaced element somewhere else, but at lea

[jQuery] Stupid question: what is the return value of replaceWith good for?

2008-12-04 Thread machineghost
While I love most things in jQuery, one thing I don't get is replaceWith. This method returns the object you just replaced, which as far as I can see is 100% worthless, rather than the the object you're replacing it with. If you do: $.(someHtmlElement).replaceWith("my div"); There is no way wh