[jQuery] Re: check/uncheck all checkboxes with specific id

2009-07-01 Thread Cesar Sanz
egroups.com Sent: Tuesday, June 30, 2009 1:34 PM Subject: [jQuery] Re: check/uncheck all checkboxes with specific id definitely defer to experience. Question, have seen you mention attr() is broken,don't use it. I try to learn and absorb as much as possible from here Is it the pe

[jQuery] Re: check/uncheck all checkboxes with specific id

2009-06-30 Thread Charlie
definitely defer to experience. Question, have seen you mention attr() is broken,don't use it. I try to learn and absorb as much as possible from here Is it the performance of attr() or reliablity problem? Matt Kruse wrote: On Jun 30, 12:24 pm, "evanbu...@gmail.com" wrote:    

[jQuery] Re: check/uncheck all checkboxes with specific id

2009-06-30 Thread Matt Kruse
On Jun 30, 12:24 pm, "evanbu...@gmail.com" wrote: >                 $(':checkbox.chkEvent').each(function() { >                     var el = $(this); >                     el.attr('checked', el.is(':checked') ? '' : > 'checked'); >                   }) Avoid attr(), and try to avoid fitting ever

[jQuery] Re: check/uncheck all checkboxes with specific id

2009-06-30 Thread Charlie
going back to the OP there is an easy method to get "starts with", and it is not necessary use each() or if  to check them $("input[id^='chkEvent']").attr("checked","checked"); this will check *all * starting with ID = chkEvent evanbu...@gmail.com wrote: Thanks. I still don't have somet

[jQuery] Re: check/uncheck all checkboxes with specific id

2009-06-30 Thread evanbu...@gmail.com
Thanks. I still don't have something quite right because this isn't working. I've added the class property to each of my event checkboxes. //check all checkbox just for the events $(document).ready(function() { $('#toggleEvents').click( function() {

[jQuery] Re: check/uncheck all checkboxes with specific id

2009-06-30 Thread aquaone
As previously stated classes would be better. Also of note, @ in attribute selectors is deprecated, but better yet, input:checkbox (which is faster than simply :checkbox I've been told). Also, if you insist on doing ids instead of class, it'd be better to use the "starts with

[jQuery] Re: check/uncheck all checkboxes with specific id

2009-06-30 Thread Eric Garside
Is there a particular reason you couldn't use classes to do this? Instead of the markup you provided, something like: Then: // Use the :checkbox instead of the old method you're using $(':checkbox.chkEvent').each(funciton(){ var el = $(this); el.attr('checked', el.is(':checked') ? ''

[jQuery] Re: Check/Uncheck boxes help...

2009-05-29 Thread MorningZ
Got some sample HTML to post for helping explain? On May 29, 10:23 am, "lilsingerc...@gmail.com" wrote: > I have a form where I have 'checkbox sections'.  So, basically, what > I'm trying to do is to determine if one of the checkboxes that belongs > to the parent checkbox has been changed and ba

[jQuery] Re: check/uncheck via toggle

2008-04-03 Thread Bruce MacKay
Thanks all for your solution. Just to wrap up the point that Karl raised about the $(this).attr('checked', true) part - in my earlier attempts I didn't have that in, but I found that clicking the check box wouldn't check/uncheck it by default. The background colour change was fired, but t

[jQuery] Re: check/uncheck via toggle

2008-04-03 Thread Mr.MoOx
Like the doc said : "Only properties that take numeric values are supported (e.g. backgroundColor is not supported by animate())." So you cool use a plugin: http://dev.jquery.com/~john/ticket/fx-rewrite2/ OR http://www.happinessinmycheeks.com/colorBlend/ With the first plugin, I will wrote this:

[jQuery] Re: check/uncheck via toggle

2008-04-02 Thread Karl Rudd
*head smack* I missed that version of the function. It's definitely not something I've used. Karl Rudd On Thu, Apr 3, 2008 at 1:47 PM, Karl Swedberg <[EMAIL PROTECTED]> wrote: > > Actually, .toggle() is a little like .load() in that it can be used for two > different things. There is the .toggl

[jQuery] Re: check/uncheck via toggle

2008-04-02 Thread Karl Swedberg
Actually, .toggle() is a little like .load() in that it can be used for two different things. There is the .toggle() effect and the .toggle(fn, fn) event, with the .toggle(fn, fn) doing an "every other" event thing. http://docs.jquery.com/Effects/toggle http://docs.jquery.com/Events/toggl

[jQuery] Re: check/uncheck via toggle

2008-04-02 Thread Erik Beeson
Also, '[EMAIL PROTECTED]' can be replaced with ':checkbox'. --Erik On 4/2/08, Karl Rudd <[EMAIL PROTECTED]> wrote: > > > The "toggle()" function is used to hide and show items, nothing to do > with clicking or changing of state. > > http://docs.jquery.com/Effects/toggle > > What you want is some

[jQuery] Re: check/uncheck via toggle

2008-04-02 Thread Karl Rudd
The "toggle()" function is used to hide and show items, nothing to do with clicking or changing of state. http://docs.jquery.com/Effects/toggle What you want is something like: $('[EMAIL PROTECTED]').click( function() { if ( this.checked ) $(this).parents('tr').animate({backg

[jQuery] Re: Check/Uncheck all checkboxes

2008-01-10 Thread IschaGast
I have it working right now but I am wondering if this is the best way? $('.chapters-title [EMAIL PROTECTED]').click(function(){ $(this).parents('.chapters-title').next('.pages- container').find('[EMAIL PROTECTED]').attr('checked', this.checked); },function(){

[jQuery] Re: Check/Uncheck a radiobutton

2007-12-14 Thread Jörn Zaefferer
debussy007 schrieb: Hello, I always used to uncheck a radio button this way : $('#radio_shuttle_1_4')[0].checked=false; The problem is that when using a selector that matches more than one element, it will not work. e.g. : $('[EMAIL PROTECTED]')[0].checked=false; will not work. Give this

[jQuery] Re: check uncheck

2007-08-31 Thread [EMAIL PROTECTED]
Thanks John I got it. Andrea On Aug 31, 12:10 pm, "John Resig" <[EMAIL PROTECTED]> wrote: > http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_disable.2F... > > --John > > On 8/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > I need the check of a checkbox disable other inpu

[jQuery] Re: check uncheck

2007-08-31 Thread John Resig
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_disable.2Fenable_an_element.3F --John On 8/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I need the check of a checkbox disable other inputs and change value > to others. > Here the code: > > //click on keep prop cancel unneces

[jQuery] Re: check uncheck

2007-08-31 Thread [EMAIL PROTECTED]
Nobody has a suggestion? Thanks Andrea On Aug 30, 9:16 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I need the check of a checkbox disable other inputs and change value > to others. > Here the code: > > //click on keep prop cancel unnecesary fields > $(document).ready(function(){ >