Tag Info

Hot answers tagged


Your button was added dynamically. So you can not bind event in simple way. As button is added after DOM is fully ready. You need to bind it with the refrence of document or body jQuery(document).on('click', '#readmore', function(e){ e.preventDefault(); alert("you clicked the button"); jQuery("#bodytext").css("display", "block"); }); Read ...

Only top voted, non community-wiki answers of a minimum length are eligible