var $j= jQuery.noConflict(); $j(document).ready(function() { }); function setMode(mode) { if (mode=="postit") { $j("#divpostitmode").css("display","block"); $j("#divpostithelpmode").css("display","none"); } else if (mode=="help") { $j("#divpostitmode").css("display","none"); $j("#divpostithelpmode").css("display","block"); } } function slideMe(id) { //GET PARENT HEIGHT TO SET AFTER CLOSE if($j("#note"+id).css("display")=="none") { h = $j("#note"+id).parent("div").css("height"); w = $j("#note"+id).parent("div").css("width"); } $j("#note"+id).slideToggle(500); //ADJUST PARENT if($j("#note"+id).css("display")=="block") $j("#note"+id).parent("div").css("height","auto") else if($j("#note"+id).css("display")=="none") $j("#note"+id).parent("div").css("height",h); idtable = "ta_postit_"+id+"_tbl"; $j("#"+idtable).find("iframe").css("height","400px"); $j("#"+idtable).css("width","100%"); var target = "#n"+id; $j('html,body').animate( { scrollTop: $j(target).offset().top-30 },1000,function() { location.hash = target-30; }); } function saveMe(postid) { $j("#message_"+postid).html("sending..."); $j("#message_"+postid).css("display","inline-block"); ta = $j('textarea#ta_postit_'+postid).val(); if (typeof tinyMCE != 'undefined') { if (tinyMCE.get('ta_postit_'+postid).isHidden()!=true) { ta = tinyMCE.get('ta_postit_'+postid).getContent(); } } $j.ajax({ type: "POST", url: "http://www.argano-pancali.it/wp-content/plugins/wp-postit/postit.php", data: "postid="+postid+"&postittext="+ta+"&t="+Date.now(), success: function(msg){ $j("#message_"+postid).html(msg); $j("#message_"+postid).fadeOut('slow'); } }); }