• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 270
  • Last Modified:

how to create jquery object ?

I have an input element
<label>	 <input name = 'inp'  value = 'AL'  
		   			type = 'checkbox' onClick='HC(this)'> AL </label> ";

Open in new window


and even handler
 function HC(chk)
 {

    tit  = tit + chk.parentNode.innerText + ', ';

Open in new window


Where I want to get the label content, for some reason it stopped working in IE
it is complaining that chk.parentNode is not an object. I would like to use Jquery
parent() function. but how to create jquery object out of chk ?
0
Rozamunda
Asked:
Rozamunda
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
function HC(chk)
 {

    tit  = tit + $(chk).closest("label") + ', ';

Open in new window

0
 
leakim971PluritechnicianCommented:
my bad...

function HC(chk)
 {

    tit  = tit + $(chk).closest("label").text() + ', ';

Open in new window

0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now