thank you very much, all of you! :)
Now I got it, I really appreciate your help.
andrea
$('.left_selected') returns always true, because if there's not a
matching element, $('.left_selected') is an array (not null) with
length = 0.
hth,
Nicola
On Tue, Aug 19, 2008 at 10:34 AM, andrea varnier
[EMAIL PROTECTED] wrote:
Hi :)
in your plugins (I'm studying from the best here :)))
The problem here is that neither of your expressions can EVER evaluate
to false. Even if no actual DOM element is selected, you still get an
empty (jQuery)array.
On Aug 19, 4:34 am, andrea varnier [EMAIL PROTECTED] wrote:
Hi :)
in your plugins (I'm studying from the best here :))) I often find
Hi Andrea,
it's really a matter of true or false. The attr() method returns a
string and so if it returns an empty one, it's evaluated as false and
the part after the || operator is then taken. You use jQuery wrapper
on both sides of the || operator and jQuery wrapper always returns
something
On Aug 19, 6:34 pm, andrea varnier [EMAIL PROTECTED] wrote:
Hi :)
in your plugins (I'm studying from the best here :))) I often find
variable assignments like this:
options = $.extend({
url: this.attr('action') || window.location.toString(),
type: this.attr('method')
5 matches
Mail list logo