jQuery

Now that jQuery UI is included in D7 core, we'll see a lot more application style functions using the UI library. Here's a quick example for adding an accordion to node content (enable and select PHP filter) demonstrating how easy it is to add jQuery UI effects and widgets in Drupal 7.

I would like to share a code snippet for a site I'm currently developing which I thought was particularly cool.

The following code adjusts the page margins in a dynamic fashion and is nice on the liquid layout I'm designing. Basically it sets the page margins (or padding in this case) logarithmically (sort of) so in a really wide screen there's heaps of margin and on low res (1024 wide) there is very little. Percentages didn't cut it.

This is an awesome trick for hiding your e-mail address e-mail harvesting bots.

HTML

<span class="fu-spammers">moc.elpmaxe@sirhc</span>

CSS

.fu-spammers {
direction: rtl;
unicode-bidi:bidi-override;

The result: moc.elpmaxe@sirhc

Syndicate content