Skip to content

Instantly share code, notes, and snippets.

@SoftCreatR
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SoftCreatR/9754783 to your computer and use it in GitHub Desktop.
Save SoftCreatR/9754783 to your computer and use it in GitHub Desktop.
Lazy inline post editing
$(".messageContent").dblclick(function() {
var $btn = $(".messageOptions a.button.jsMessageEditButton", this);
if($btn.length) {
$btn.dblclick();
}
});
@dtdesign
Copy link

$(".messageContent").dblclick(function() {
    $(this).find(".messageOptions a.button.jsMessageEditButton").trigger('click');
});

@SoftCreatR
Copy link
Author

Ty. I just had to replace click by dbclick because a single click just opens the dropdown :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment