jQuery(document).ready(function(){ AjaxEditComments.init(); }); var AjaxEditComments = function() { var $j = jQuery; var timers = new Array(); var PluginUrl = "http://www.dreamstation.cc/wp-content/plugins/wp-ajax-edit-comments"; var CommentAuthorName = "editAuthor"; var CommentClassName = "editComment"; var EditCommentAuthorName = "editableAuthor"; //not edible author :) var EditCommentClassName = "editableComment"; var TextAuthorClassName = "textAuthor"; var TextCommentClassName = "textComment"; //Scans the spans and divs for a specific class and sets events to make them editable function MakeEdit() { StopEdit(); //Make the Author portions editable $j('.' + CommentAuthorName).bind("mouseover",function() {ShowAsEditable($j(this));}); $j('.' + CommentAuthorName).bind("mouseout",function() {ShowAsUnEditable($j(this));}); $j('.' + CommentAuthorName).bind("click",function() {Edit($j(this)); return false;}); //Make the comment portions editable $j('.' + CommentClassName).bind("mouseover",function() {ShowAsEditable($j(this));}); $j('.' + CommentClassName).bind("mouseout",function() {ShowAsUnEditable($j(this));}); $j('.' + CommentClassName).bind("click",function() {Edit($j(this)); return false;});