Demos

Toggle ninesixty theme (960) grids with js

Toggle  ninesixty theme (960) grids with jsI love the "show-grid" body class, but sometimes you don't want to see the pretty grids when you developing.

As it is right now, you have to edit your subtheme bodytag as in remove or rename the "show-grid" class to disable the grids, then add it or rename is to show-grid again.

I was tired of doing that every time I wanted to see how the site really looked without the grids, so I made a little JS-Snippet.

Create your own jQuery filters

Ever needed some custom filters with jQuery? Its easy to do yourself.

The "syntax" is simply this.

$.expr[':'].FILTERNAME = function(el, i, match, array) {  
// Do your filterstuff here!  
// return true on success  
};

 

Printfriendly for Drupal

Print FriendlyThis is just a sample page to show you how my new module printfriendly works. Printfriendly is very easy to use, click and try on the  printfriendly button down below.

Cookie plugin for jQuery

This is an extremely easy plugin I found. It is made by Klaus Hartl and it makes the work with cookies very slightly.

Just take a look at the examples:

Maxlength with jQuery

This plugin makes it easy to apply a "maxlength" attribute to custom elements for example a <textarea>. It also gives you the possibility to add a nice character counter under the element that shows the user how many chars he/she has left before the maxlength is reached, and/or an alert message.

To use this on a simple text area, all you have to do is:

<script type="text/javascript">  
  $(document).ready(function(){  
    $('#textarea_1_1').maxlength();  
  });  
</script>