Solved

how to create jquery object ?

Posted on 2012-03-12
2
259 Views
Last Modified: 2012-06-22
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
Comment
Question by:Rozamunda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 37711850
function HC(chk)
 {

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

Open in new window

0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 37711860
my bad...

function HC(chk)
 {

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

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question