Guest User

Untitled

a guest
Jun 21st, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. var foo = 0;
  2.  
  3. // Jeditable stuff
  4. $(".edit_area").editable("save.php", {
  5. type : "autogrow",
  6. submit : 'OK',
  7. cancel : 'Cancel',
  8. tooltip : "Click to edit...",
  9. onblur : "ignore",
  10. cssclass : 'edit',
  11. width : 'none',
  12. height : 'none',
  13. callback : function() {
  14. // $('.edit_area').not($(this)).editable('enable');
  15. },
  16. autogrow : {
  17. lineHeight : 16
  18. }
  19. });
  20.  
  21.  
  22. $('.edit_area').click(function() {
  23. if(foo) { return }
  24. foo = 1;
  25. $('button').wrapAll('<div class="buttons"></div>');
  26. }).hover(function() {
  27. $(this).addClass('edit_hover');
  28. }, function() {
  29. $(this).removeClass('edit_hover');
  30. });
  31.  
  32. $('button[type=cancel]').click(function() {
  33. foo = 0;
  34. })
Add Comment
Please, Sign In to add comment