Random Chusses…

Blogging dangerously…

Archive for April 2009

Modifying dropdown tooltips using JQuery

without comments

jquery_avatarFinally got to try out some more JQuery goodness in an Asp.Net project at work. The width of the drop down was little too short for the user to see the whole text. So we decided to show it all in the tooltip instead. That meant modifying the title property of the HTML drop down. So I added the following the $(document).ready event handler. The function retrieves the drop down by its ID and iterates over it using the nice .each() provided by JQuery and sets the text to the title. Nice and easy. JQuery is cooool. Write less, do more.


$(document).ready( function() {
  $("#dropdown").each(function(index) {
    $(this).attr({
      title: $(this).text()
    })
  });
});

a

Written by Daud Ahmad

April 24, 2009 at 12:49 pm

IE8 gets a new View Source

without comments

ie8-logo1So IE8 finally got released the other day and I decided to install it. After grabbing the 16MB installer from the Microsoft web site I had to restart the computer of course and there it was in all its glory…the most sophisticated explorer of the internets known to mankind…version 8. I don’t really need it to explore the internet. It’s just a requirement for my software supporting needs since I mostly do Asp.Net stuff which is of course only Internet Explorer 6 compatible. These apps don’t usually work on newer versions of explorer due to a variety of unknown reasons. Something to do with standard HTML.

Anyway, the thing that I really hated about previous versions of explorer was the View Source. That’s about the only thing I actually ended up using for my meagre programming needs. The source opened up in Notepad which is a seriously out dated piece of software with absolutely no sytax highlighting. All I wanted was syntax highlighting. That’s the the mosic basic and probably the only thing one needs from a source viewer. How hard is that? But thankfully IE8 gets a syntax highlited source viewer. So now that HTML looks like this.

ieviewsource1

Instead of this:

notepad

Which is quite an improvement. Plus IE8 also has some development tools like javascript debugging and stuff. Haven’t used them yet though…maybe some day…

Written by Daud Ahmad

April 17, 2009 at 10:30 pm