Hi,
<label><input type="checkbox" id="Exep1" checked="checked" onclick="Do(this);"/> My label text here</label>
I used :
function Do(T){
var XcEP = $(T).parents().html().match(/^[-\s]*(.+?)[\s()\d]*$/,"i")[1]);
alert(XcEP);
}
The function above alerts:
<input type="checkbox" id="Exep1" checked="checked" onclick="Do(this);"/> My label text here
But i want only "My label text here" to be in alert!
Any help is too much appreciated
Thanks