jquery - run javascript function on check change of checkbox inside a div with specific class -


i've check box inside repeater control. repeater may have variable number of items. need call js function whenever checkbox id "dfo_mfo" of list item checked/unchecked. how can that? i've tried following code not working.

$(".dfo_mfo").change(function () {     dfomfochecked($(this)); }) 

asp.net markup

<asp:checkbox runat="server" id="dfo_mfo" class="dfo_mfo"></asp:checkbox> 

html rendering

<span class="dfo_mfo">     <input id="ctl00_pagecontent_bulk_wotablecontrolrepeater_ctl00_dfo_mfo" type="checkbox" name="ctl00$pagecontent$bulk_wotablecontrolrepeater$ctl00$dfo_mfo"> </span> 

try :

$(".dfo_mfo").children('input').change(function () {     dfomfochecked($(this)); }) 

Comments

Popular posts from this blog

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -