[jQuery] Re: how to add elements to a jQuery object without copying it

2008-09-23 Thread ~flow
oops, little typo---got to use `$Q` instead of `$` in my project. wrote an extension method: jQuery.fn.push = function( selector_or_nodes ) { // Given a selector or a jQuery object, append all of the nodes to the current jQuery object. var nodes = $is_string( selector_or_nodes )? $Q( selecto

[jQuery] Re: how to add elements to a jQuery object without copying it

2008-09-23 Thread ~flow
ed to the jQuery object, but the assignment’s right hand side gets lost.) thanx again! cheers & ~flow

[jQuery] how to add elements to a jQuery object without copying it

2008-09-23 Thread ~flow
); var s = t; t.push( '.bar' ); // should now like like $( '.foo,.bar' ) assert( s === t, 'object identity broken' ) any ideas what to write for `$().push`? cheers & ~flow

[jQuery] Re: puzzling black hole in $(...).hasClass()?

2008-09-19 Thread ~flow
execution just fails silently, untraceably. cheers & ~flow On Sep 19, 3:35 am, Dave Methvin <[EMAIL PROTECTED]> wrote: > > the argument to `hasClass` is problematic: it uses selector-syntax and > > starts with a dot. this is a mistake that easily results from copy-n- > > pastin

[jQuery] puzzling black hole in $(...).hasClass()?

2008-09-18 Thread ~flow
he above example would still print out. javascript execution just stops silently in some dark dead end. any ideas, anyone? cheers & ~flow

[jQuery] Re: about $(document).ready()

2008-09-18 Thread ~flow
敬��原��但是文字上大概有�c儿不太清楚。 `$(document).ready(x)` [EMAIL PROTECTED] 如果document已��完成的�r候script�f`$(document).ready(x)`的��,那它的引��`x`立即被execute。 一个document ready的引��function可以有多少clauses,也可以在一个script�Y面define多少document ready,它��都�⒈��绦小� 例。$(document).ready(function(){alert('helo')}) 以上。 On Se