Learn how to use jQuery at the Blog

Dr. Martens For Life « visit

  • Added 8 months ago
  • 22 Lines of Code shown
  • 3 Links of Interest
http://drmartensforlife.com
This is my Source Code and I don't want to show it here
View Source Code only (as overlay)
// That code snippet belongs to Dr. Martens For Life - http://drmartensforlife.com

$(document).ready(function(){
	$("a.alert").click(function(){
		tb_show(null,this.href+'?width=539&height=285',false); 
		return false; 
	})
});


 
$.fn.clearForm = function() {
  return this.each(function() {
    var type = this.type, tag = this.tagName.toLowerCase();
    if (tag == 'form')
      return $(':input',this).clearForm();
    if (type == 'text' || type == 'password' || tag == 'textarea')
      this.value = '';
    else if (type == 'checkbox' || type == 'radio')
      this.checked = false;
    else if (tag == 'select')
      this.selectedIndex = -1;
  });
};