Knowledge Walls
John Peter
Pune, Maharashtra, India
How to copy element to iframe in JQuery with Event Handler
Clone(boolean [copy event handler]) method is used to clone / copy / duplicate element in jquery. Here in this example div cloned / copied to iframe and its click event working even after cloning element.
        <script type="text/javascript" src=""></script>
        <script type="text/javascript">
                    alert("Yes it is!");
                //But with id selector will make problem. Try to use class instead of id selector
         <!-- HTML statements -->
         <button id="txt_button">
              Do it
         <iframe id="my_iframe"></iframe>
Best Lessons of "One day One Thing to Know"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details