diff options
author | Theo Chatzimichos <tampakrap@gentoo.org> | 2013-03-10 12:10:26 +0100 |
---|---|---|
committer | Theo Chatzimichos <tampakrap@gentoo.org> | 2013-03-10 12:10:26 +0100 |
commit | 7aea9fc04bd42e2ac02a1925d3a02a76d391c3e7 (patch) | |
tree | 68c852c654cef340592f1001b6310e33827b130c /plugins/wp-syntax/js | |
parent | Make the script more silent (diff) | |
download | blogs-gentoo-7aea9fc04bd42e2ac02a1925d3a02a76d391c3e7.tar.gz blogs-gentoo-7aea9fc04bd42e2ac02a1925d3a02a76d391c3e7.tar.bz2 blogs-gentoo-7aea9fc04bd42e2ac02a1925d3a02a76d391c3e7.zip |
update plugins
Diffstat (limited to 'plugins/wp-syntax/js')
-rw-r--r-- | plugins/wp-syntax/js/wp-syntax.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/wp-syntax/js/wp-syntax.js b/plugins/wp-syntax/js/wp-syntax.js new file mode 100644 index 00000000..f7f6c739 --- /dev/null +++ b/plugins/wp-syntax/js/wp-syntax.js @@ -0,0 +1,34 @@ +jQuery(document).ready(function($) +{ + $('.wp_syntax').bind( + { + mouseover: function() + { + var w = $(this).find('table').outerWidth(); + var hw = $(document).width() - $(this).offset().left - 20; + + /* + * Test code. + */ + /*var left, top; + left = $(this).offset().left; + top = $(this).offset().top; + + $(this) + .appendTo('body') + .css({ + 'position': 'absolute', + 'left': left + 'px', + 'top': top + 'px' + }); + */ + + if(w > $(this).outerWidth()) + $(this).css({'position':'relative', 'z-index':'9999', 'box-shadow':'5px 5px 5px #888', 'width':(w > hw ? hw : w)+'px'}); + }, + mouseout: function() + { + //$(this).removeAttr('style'); + } + }); +});
\ No newline at end of file |