Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.fn.widget.menubar = function($w) {
- var $menubar = $("h1.menubar",$w), w = $w.attr("id");
- if($menubar.children("ul").length === 0) {
- $("<ul />")
- .append("<li class='close' id='"+w+"_close'/>")
- .append("<li class='min' id='"+w+"_min'/>")
- .append(($w.data("options.widget").prefs ? "<li class='prefs' id='"+w+"_prefs'/>" : ""))
- .prependTo($menubar);
- }
- $(".close",$w).unbind("click").click(function(e) {
- $w.widget("destroy");
- });
- $(".min",$w).unbind("click").click(function(e) {
- $w.widget("mini");
- });
- $(".prefs",$w).unbind("click").click(function(e) {
- $w.widget("prefs");
- });
- };
Add Comment
Please, Sign In to add comment