jQuery(document).ready(function() { //Select all anchor tag with rel set to tooltip jQuery('a[rel=wpwptooltip]').mouseover(function(e) { //Grab the title attribute's value and assign it to a variable var tip = jQuery(this).attr('name'); //Append the tooltip template and its value jQuery(this).append(''); //Set the X and Y axis of the tooltip jQuery('#wpwptooltip').css('top', e.pageY + 5 ); jQuery('#wpwptooltip').css('left', e.pageX + 5 ); //Show the tooltip with faceIn effect jQuery('#wpwptooltip').fadeTo('10',0.95); }); //Select all anchor tag with rel set to tooltip jQuery('a[rel=wpwptooltip]').mouseout(function(e) { jQuery(this).children('div#wpwptooltip').remove(); }); jQuery('.selectall').click(function(e) { jQuery(this).focus(); jQuery(this).select(); }); // show existing AR showaroptions('defaultlist_type',1); }); function validateform() { var valid = true; jQuery('.error').remove(); if(!valid) { alert("Please fix the errors marked below!"); } return valid; } function showaroptions(elem, id) { jQuery('.ar_list_'+id).hide(); var list = jQuery('#'+elem).val(); jQuery('#ar_list_'+list+'_'+id).show(); if(list == 'AW') { jQuery('#AR_list_AW_1_un').show(); } }