I am trying to monitor the usage of the sage cells on a web page, so I 
inserted code like this:

$("button.sagecell_evalButton").on('click', function() {

    do_stuff_here

}

Everything seems to be working fine, except that the first time I click an 
evaluate button,
nothing seems to happen.  The second and later clicks work as usual.

My javascript records the initial click, even though the cell is not being 
evaluated.

If I replace do_stuff_here by *absolutely nothing*, the first click on the 
evaluate button
still has nothing happen.  So I am guessing that I should use some other 
method to
record the clicks on the evaluate buttons.

In case it matters, the above jascript is inside a setTimeout, so that it 
doesn't run until
after the sage cell code builds the cells on the page.  Probably that is 
not the right way
to do it, either.

Also, there are a dozen or so (linked) cells on the page, and it does not 
matter which
button I click first: nothing happens to any of them.  But they do flash a 
color, so I know
I am clicking it.

Any suggestions?

David

-- 
You received this message because you are subscribed to the Google Groups 
"sage-cell" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-cell/51505dd0-6ab3-475d-ba7e-4ff8510b2968%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to