[jQuery] subclass

2009-10-05 Thread Anjanesh
How do I create a subclass ? (function($) { $.fn.myname = function(){ return this.each(function(){ }); } })(jQuery); (function($) { $.fn.myname.subname = function(){ return this.each(function(){ }); } })(jQuery); $("#id1")

[jQuery] namespace

2009-06-24 Thread Anjanesh
How do I create a namespace within jQuery ? (function($) { var myNS = {}; })(jQuery); (function($) { $.fn.myNS.foo_1 = function(){ }; })(jQuery); (function($) { $.fn.myNS.foo_2 = function(){ }; })(jQuery); $("#id1, id2").myNS.foo_1(); $(".cls1, .cls2").m

[jQuery] Re: .css('line-height', 'auto') doesnt work

2009-02-19 Thread Anjanesh
"normal". > > http://www.w3.org/TR/CSS21/visudet.html#propdef-line-height > > --Klaus > > On 20 Feb., 07:33, Anjanesh wrote: > > > $('.div > p').css('line-height', '25px'); works but $('.div > p').css > > ('line-height', 'auto'); doesnt. > > Is there anyway to set to auto ?

[jQuery] .css('line-height', 'auto') doesnt work

2009-02-19 Thread Anjanesh
$('.div > p').css('line-height', '25px'); works but $('.div > p').css ('line-height', 'auto'); doesnt. Is there anyway to set to auto ?

[jQuery] Sending Arguments to Event

2009-01-27 Thread Anjanesh
I understand jQuery has parameters stored in event.data.* But Is there a way to achieve this using jQuery ? var someVar = { init : function () { $('#someID').bind("click", ['arg1', 'arg2'], this.add); }, add : function(p1, p2) { alert(p1 + ' : ' + p2); // Doesnt show a

[jQuery] Re: Select first sibling

2009-01-06 Thread Anjanesh
().filter(":first").fadeTo > (1500, 0.3); > > easily found using the docs:http://docs.jquery.com/Selectors > > On Jan 5, 9:09 am, Anjanesh wrote: > > > Hi > > How do get to select the FIRST sibling ? > > > The problem with this is that it fades out al

[jQuery] Select first sibling

2009-01-05 Thread Anjanesh
Hi How do get to select the FIRST sibling ? The problem with this is that it fades out all the siblings. Click here Thanks

[jQuery] Multiple Selector Iterator short-cut

2008-03-05 Thread Anjanesh
Is there a way to reduce this $("#id1, #id2, #id3, #id4, #id5, #id6, #id7, #id8, #id9, #id10").click(function() { ... }); to something like this $("#id[1-10]).click(function() { ... }); ?

[jQuery] Re: Parent Child Selectors + bind

2007-09-26 Thread Anjanesh
But doesnt $("#id1 > :text") select only the first textbox under #id1 element ? I wanted to bind the focus function to all textboxes under id1. But I found this plugin (http://www.texotela.co.uk/code/jquery/ focusfields/) to do what I wanted to do anyway.

[jQuery] Parent Child Selectors + bind

2007-09-26 Thread Anjanesh
Hi I cant get this seem to work $("#id1 > [EMAIL PROTECTED]").bind("onfocus", foo); Is there something wrong with the argument ? Thanks

[jQuery] Response Status Codes

2007-09-18 Thread Anjanesh
Hi All this time I was using AJAX natively. But now Im getting the hang of jQuery. I normally want to check if Im getting a 200, 404, 500 etc response status on success [code] var xhr = NewXMLHttpRequest(); xhr.onreadystatechange = xhrChange; function xhrChange() { switch (xhr.readySt

[jQuery] Re: Google Code

2007-09-18 Thread Anjanesh
Wow ! I really thought prototypejs being the more popular one ! http://www.prototypejs.org/real-world Odd, I thought Google Web Toolkit (http://code.google.com/webtoolkit/) was another JavaScript framework.