简体   繁体   中英

Show and Hide Div on dynamic generated checkbox value using jQuery or Javascript

I want to fire an event (show and hide div) on dynamic generated checkbox (generated through Ajax).

I tried many events like window.onload, document.load etc but I did not get success.

I don't want to click anywhere. I am only fire event on page load or document load.

Can any expert please help me?

Thanks in advance.

You may use

$('body').on('yourEventGoesHere','.className',function(){
        ... event handler code ....
});

Read more

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM