views:

40

answers:

3

I want to get the object of this code ,

<input class="radio" 
       id="conversation_sub_kind_id_208"
       name="conversation[sub_kind_id]"
       onclick="set_department_name('department_name208')"
       type="radio"
       value="208" />

I want to use jQuery Framework to get the object, like the document.getElementbyTagName("conv..."); what should i do in here? Thank you, and best regards!

+5  A: 
$('#conversation_sub_kind_id_208'); 

more here

Dan Heberden
+3  A: 

It should be as simple as $('#conversation_sub_kind_id_208'). That would give you the jQuery object. If you want the underlying DOM element, do it like this: $('#conversation_sub_kind_id_208').get(0).

Peter Jaric
+2  A: 

Or you could not use Jquery and simply do: document.getElementById("conversation_sub_kind_id_208");

unomi