Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('[data-module]').css({
- 'padding': '0px', 'background': 'inherit', 'border': 'none'
- }).on('mouseover', function(){
- $(this).css({'border': '1px dashed black', 'padding': '3px'})
- }).on('mouseout', function(){
- $(this).css({'border': 'none', 'padding': '0px'})
- }).each(function(){
- var _module = $(this);
- var _menu = "<div><a href='#edit'>Edit</a> | <a href='#delete'>Delete</a></div>";
- $(_menu).find('a[href=#edit]').on('click', function(){
- alert('Edit to: ' + _module);
- });
- $(_menu).find('a[href=#delete]').on('click', function(){
- alert('Edit to: ' + _module);
- });
- _module.append(_menu)
- .on('mouseover', function(){
- _menu.show();
- })
- .on('mouseout', function(){
- _menu.hide();
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement