[jQuery] multiple toggle classes within one ID

2008-11-07 Thread carbon
Hi, I'm trying to implement multiple toggle classes within one ID. When you toggle 1 class, the intial span 'view details' would hide and the hidden span 'hide details' would display. the problem i'm having is i'm unable to specify the text toggling to happen just to the current class. its

[jQuery] Change text on toggle effect

2008-11-26 Thread carbon
Hi guys, I've written the below function to change the text on toggle, problem is i want this though i don't want this to be controlled by the JS. currently have 2 spans.. span class=viewView details/span span class=hideHide details/span The 'view' class is visible while the 'hide' class is

[jQuery] Stripping last html tag within an area.

2009-03-08 Thread carbon
is it possible to use jQuery to strip a tag from a 'div' ? example: article phello world/p plast paragraph/p /article I would like strip the p tags from 'last paragraph'.

[jQuery] Re: Stripping last html tag within an area.

2009-03-08 Thread carbon
Thanks, but that didn't work. what does the .replaceWith($(this).htlm() do? shouldn't we use something like 'remove' instead? On Mar 9, 10:37 am, comslash.com comsl...@gmail.com wrote: Try this. $('articlep:last').replaceWith($(this).html()); On Mar 8, 7:22 pm, carbon carbon.ca

[jQuery] Re: Stripping last html tag within an area.

2009-03-08 Thread carbon
p:last').remove(); --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mar 8, 2009, at 7:44 PM, carbon wrote: Thanks, but that didn't work. what does the .replaceWith($(this).htlm() do? shouldn't we use something like 'remove' instead? On Mar 9, 10:37 am

[jQuery] Re: Stripping last html tag within an area.

2009-03-08 Thread carbon
with what ever is inside of the p tag including other html tags (ie strong) .replaceWith($(this).html()); // end the for each and selection }); On Mar 8, 7:55 pm, carbon carbon.ca...@gmail.com wrote: just the tags p, leaving the content 'last paragraph'. On Mar 9, 10:50 am, Karl Swedberg

[jQuery] jQuery Validation - group input field validation

2009-07-14 Thread carbon
Hi, How can I do validation on a group of input fields, as long as one of the 3 fields have a value then it's valid, I've managed to group them, but it's showing up with 3 error messages instead of one. How can I get it to display just the one error msg for all 3 input fields? Here's my

[jQuery] Re: jQuery Validation - group input field validation

2009-07-14 Thread carbon
Just before the form, theres the DIV that contains the error messages. div id=errorContainer h4There are errors in your enquiry submission, please see below for details./h4 ol lilabel for=firstname class=errorPlease enter your first name/label/li lilabel for=lastname