Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. $('[data-module]').css({
  2. 'padding': '0px', 'background': 'inherit', 'border': 'none'
  3. }).on('mouseover', function(){
  4. $(this).css({'border': '1px dashed black', 'padding': '3px'})
  5. }).on('mouseout', function(){
  6. $(this).css({'border': 'none', 'padding': '0px'})
  7. }).each(function(){
  8. var _module = $(this);
  9. var _menu = "<div><a href='#edit'>Edit</a> | <a href='#delete'>Delete</a></div>";
  10. $(_menu).find('a[href=#edit]').on('click', function(){
  11. alert('Edit to: ' + _module);
  12. });
  13. $(_menu).find('a[href=#delete]').on('click', function(){
  14. alert('Edit to: ' + _module);
  15. });
  16.  
  17. _module.append(_menu)
  18. .on('mouseover', function(){
  19. _menu.show();
  20. })
  21. .on('mouseout', function(){
  22. _menu.hide();
  23. })
  24. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement