Clickable Div Using Jquery

An update to an old post. I found a much cleaner solution using jquery.

The setup:

<div id="clickable">
  <h2><a href="#">Clickable Text</a></h2>
</div>

Now the jquery:

$(document).ready(function(){

  $("#clickable").click(function(){
    window.location=$(this).find("a").attr("href"); return false;
  });

});

A nice clean solution that plucks the link from the div and makes the entire thing clickable.

Sideways Text

Just upgraded to Firefox 3.5 and I have to test out the goods.

Sideways Text

If your on a cutting edge browser the text should appear sideways. I had to tweak a bit to get it to display properly, so obviously there are a few bugs or misconceptions. The code for the curious is:


<div style="height:100px;">
  <br/><br/>
  <span style="-webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg);">Sideways Text</span>
</div>