Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var cometa = (function(){
- this.toggle = function(obj,panel) {
- var panel = $(panel);
- if(parseInt(panel.css('left')) > 0) {
- panel.css('left','');
- panel.css('width', $(obj).outerWidth()-1 );
- } else {
- panel.css('left', parseInt(panel.css('right')) );
- panel.css('width', '');
- }
- };
- return this;
- })(cometa);
- $(document).ready(function() {
- var panel = $('#cometa_panel');
- var right = parseInt(panel.css('right'));
- panel.css('left', right);
- $('#cometa_toggle').click(function(){
- cometa.toggle(this,'#cometa_panel');
- });
- });
Add Comment
Please, Sign In to add comment