Populära artiklar av Emil Stjerneman

Linkit - the new way to link with Drupal wysiwyg

Updated 2011-03-02

Linkit

Linkit provides an easy interface for internal linking. Linkit links to nodes, users, views and terms by default, using an autocomplete field. Linkit has two major advantages over traditional linking

  • The user does not have to copy or remember a URL.
  • If the target node changes it's alias (e.g. if the node's menu item title is changed) the link will remain functional.

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.

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> 

 

Trodde ni jag hade fått nog?

Då trodde ni fel! Nu tar jag det till en helt ny nivå av energiförbrukning, strålning och träning av nackmuskeln.

IE6

Run this site in IE6 mode

Press to run this site in IE6 mode.

Sorry, this probably doesnt work if your current browser is IE6.