How to use Split with jQuery?

var str = ‘something — something_else’; var substr = str.split(‘ — ‘); // substr[0] contains "something" // substr[1] contains "something_else" Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it Subscribe to the comments on this post

Clickable elements

<a> tags are great for text and images, but what about divs? or list elements? not so much. With most of my images, I set them as background images of a div, when it comes to positioning divs on a page it’s just easier than having to mess with the images within them as well. Here’s a tidy way of making your div clickable. <div onclick="location.href=’http://sbramley.com/’;" style="cursor: pointer;"> </div> Bookmark

Switch to our mobile site