Load custom.js file that is not in my ipython profile directory

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Load custom.js file that is not in my ipython profile directory

David Ketcheson
I'd like to load some javascript into the notebook from a .js file that is not in my ipython profile directory.  This would allow me to distribute the notebook and the .js file together and have users get the benefit of the .js file in the notebook.

I know how to do the analogous thing with .css files, based on the content of the last cell in this notebook:


How can I do the same for javascript?

-David

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Load custom.js file that is not in my ipython profile directory

Aron Ahmadia
%% javascript

That and the profile are the two most common methods for enabling custom js.  The previous method of embedding in Markdown is no longer allowed. 

A

On Wednesday, May 7, 2014, David Ketcheson <[hidden email]> wrote:
I'd like to load some javascript into the notebook from a .js file that is not in my ipython profile directory.  This would allow me to distribute the notebook and the .js file together and have users get the benefit of the .js file in the notebook.

I know how to do the analogous thing with .css files, based on the content of the last cell in this notebook:


How can I do the same for javascript?

-David

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev