Some Useful JavaScript & jQuery Snippets – Part 3
Development January 8, 2010 by cody 5 Comments

$('#target div:not(#exclude)').hide();
//or
$('#target').children().filter(':not(#exclude)').hide();
$('element').bind('resize', function(){
alert( 'Height changed to' + $(this).height() );
}
$('someTableSelector').find('tr:gt(0)').remove();
1 level:
$('*:not(* *)');
2 level:
$('*:not(* *)').find('> *');
3 level:
$('*:not(* *)').find('> * > *');
var foundin = $('*:contains("some string bla bla")');
alert($(document).scrollTop());
$('* :not(.someclass)')
$('#myTable tr:last').after('<tr>...</tr>');
num = num.toString(16); reverse process: num = parseInt(num, 16);
var elements = $('#someid input[type=sometype][value=somevalue]').get();
var date = new Date();
date.setTime(date.getTime() + (x * 60 * 1000));
$.cookie('example', 'foo', { expires: date });
example: first 10 anchors
$('a').slice(0,10);
//or
$('a:lt(10)');
//Get the value of a selected option
$('selectElement').val();
//Get the text of a selected option
$('#selectElementId :selected').text();
//Remove an option (e.g. id=1)
$("#selectElementId option[value='1']").remove();











Definitely some useful JavaScript and jQuery scripts man. I can probably even use a few on my blog, great!
Great and usefull!!
thanks!