Stylize the last element in jQuery


Here is how to stylize the border of the last element using jQuery.

$(document).ready(function() {
    $("table.innercart tr:last").css("border", "none");
});

You can compare to prototype by going here

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • Slashdot
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Share/Bookmark
  1. #1 by Guy on June 16, 2008 - 4:52 pm

    Can be shortened to:

    $(function() {
    $(“table.innercart tr:last”).css(“border”, “none”);
    });

  2. #2 by Alex Grande on August 26, 2008 - 8:54 pm

    This is true if you do not need to load this script before the dom is fully loaded.

(will not be published)