I had a little trouble getting started with Bottle. The main thing was that I had trouble accessing my own Javascript in Bottle’s BasicTemplates. The trick was to do two things:
- Allow templates to access the “get_url” function
- Create an endpoint to serve your own static pages yourself
Continue reading Getting Started with Bottle →
An alternate title might be: how to bind event handlers to new, or dynamically generated, table rows. When using jQuery, we attach sets of instructions to different parts of an HTML document using selectors. Suppose you wanted to attach some functionality to some text in a table, for example, when you click on a row in a table, it brings up a new table below the first table. This is actually kind of tricky, it turns out that there is a distinction between direct and delegated event handlers.
Continue reading Direct and Delegated Event Handlers in jQuery →
Blog about math, programming, and data.