Postingan

Menampilkan postingan dari Maret, 2014

jQuery UI Datepicker for jQuery Mobile

Gambar
Can you guess which datepicker is this? It is the jQuery UI datepicker tweaked for jQuery Mobile! I have written a small patch that allows you to use the jQuery UI datepicker with jQuery Mobile 1.4.x. To use the script: Include jQuery UI datepicker javascript after jQuery Mobile javascript files. You do not need the whole package; just grab the jquery.ui.datepicker.js file from from jQuery UI ZIP downloads. Include the monkey patch script; it basically replaces jQuery UI CSS classes with jQuery Mobile CSS classes in datepicker HTML. Add CSS rules to fine tune the appearance of datepicker. Call $(selector).datepicker() method on pagebeforecreate or pagecreate . Demo View source Open in new window

CSS nth-child Selector Pwned

Gambar
The CSS3 :nth-child() selector pseudo-class allows you to select elements based on their position in the set of children of their parent. It accepts an argument in the form of an + b . How exactly does it work? Let me explain. In very simple words, the expression an + b matches every a th element in the set starting from the b th element keeping in mind that (i) the index numbering starts at 1 (ii) zero and negative values do not represent any element (iii) text and non-element nodes are not counted. The following corollaries exist: a can be zero or an can be omitted – in which case there is no "every a th element in the set" clause and only the b th element is matched. a can be negative – in which case every a th element is matched going backwards, towards non-existing elements. b can be zero or negative – in which case the matching starts from a non-existing element. The argument can be odd or even – which represent the expressions 2n + 1 and 2n resp