[IPython-dev] ipython notebook "current cell changed signal"

Thomas Kluyver takowl at gmail.com
Wed Aug 27 05:34:04 EDT 2014


That could be a bug - if the events don't make sense at present, be aware
that we may fix them in a future release.


On 27 August 2014 10:17, Trémouilles David <david.trem at gmail.com> wrote:

>  OK. I have finally figured this out by myself :-)
>
> 'selected_cell_type_changed.Notebook' is
> actually what I was looking for.
>
> I was misled by the naming. My first thought was
> that the 'selected_cell_type_changed.Notebook' signal
> was *only* triggered when the selected "cell type" was
> changed, actually it is triggered either when the
> "selected cell" or the "selected cell type" are changed...
>
> Best regards,
>
> David
>
> Le 26/08/14 21:15, Trémouilles David a écrit :
>
> Hello,
>
> In the IPython notebook, I would like to trigger a javascript
> function when the notebook currently selected cell changes.
>
> I have found this kind of solution:
>
> %%javascript
> $([IPython.events]).on('select.Cell', function (event, data) {
>            console.log("changed...")
>         });
>
> However it only works when the cell is changed by clicking on
> another one but not when navigating with the up and down arrow key...
> Is there any simple solution to trigger a javascript function
> whenever the selected cell changes ?
>
> (I'm using the current ipython github repo head.)
>
> Thanks in advance,
>
> David
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140827/3877225d/attachment.html>


More information about the IPython-dev mailing list