Browsing All Posts published on »July, 2011«

Sci-fi author Duncan Munro’s 1950 short story “U-Turn” includes a well-known passage that reads, “May you live in interesting times.” I haven’t actually read the story, therefore can’t say whether it was meant as a blessing or a curse. Regardless, it seems particularly applicable to those of us steeped in Web development, as the last […]

This is the CI .htaccess file that I use for my CodeIgniter PHP projects (some of these CodeIgniter htaccess rules can be used for any project, keep reading). CodeIgniter uses mod_rewrite to route all requests to the CI front controller. I’ve made some additions in an attempt to canocalize some of the CodeIgniter URL end […]

Description: Bind an event handler to the “click” JavaScript event, or trigger that event on an element. version added: 1.0.click( handler(eventObject) ) handler(eventObject)A function to execute each time the event is triggered. version added: 1.4.3.click( [eventData,] handler(eventObject) ) eventDataA map of data that will be passed to the event handler. handler(eventObject)A function to execute each […]

Types JavaScript provides several built-in datatypes. In addition to those, this page documents virtual types like Selectors, enhanced pseudo-types like Events and all and everything you wanted to know about Functions. You should be able to try out most of the examples below by just copying them to the Firebug console (note: Firebug requires Firefox). […]

This is a basic tutorial, designed to help you get started using jQuery. If you don’t have a test page setup yet, start by creating a new HTML page with the following contents: <!doctype html> <html> <head> <meta charset="utf-8"> <title>Demo</title> </head> <body> <a href="http://jquery.com/">jQuery</a> <script src="jquery.js"></script> <script> </script> </body> </html> Edit the src attribute in […]

The jQuery library is stored as a single JavaScript file, containing all the jQuery methods. It can be added to a web page with the following mark-up: <head> <script type=”text/javascript” src=”jquery.js”></script> </head> Please note that the <script> tag should be inside the page’s <head> section. Basic jQuery Example The following example demonstrates the jQuery hide() […]