[IPython-dev] Regarding Javascript rendering inside IPython notebooks

TARUN GABA tarun.gaba7@gmail....
Mon Jun 3 05:36:01 CDT 2013


HI,

As the part of a project, I require to embed a button inside a Javascript
display.
I have appended the button using Jquery ($()), but it is unable to produce
the onClick target, which is a function which is defined inside the same
Javascript data, which is being rendered.

Code Snippet:

   container.show();
    var $mydiv = $("<div/>").attr("id", "div");

    $mydiv.empty();
    $mydiv.attr("style","background-color:rgb(104,104,104)");
    $mydiv.append("<button style=\"margin-top:2px;margin-left:2px;\"
onClick=\"reset();\">Reset</button>
    element.append($mydiv);
    function reset(){ ....

     };


Anything I might be doing incorrectly?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130603/4207ff6a/attachment.html 


More information about the IPython-dev mailing list