Guest User

Untitled

a guest
May 25th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. $.fn.widget.menubar = function($w) {
  2. var $menubar = $("h1.menubar",$w), w = $w.attr("id");
  3. if($menubar.children("ul").length === 0) {
  4. $("<ul />")
  5. .append("<li class='close' id='"+w+"_close'/>")
  6. .append("<li class='min' id='"+w+"_min'/>")
  7. .append(($w.data("options.widget").prefs ? "<li class='prefs' id='"+w+"_prefs'/>" : ""))
  8. .prependTo($menubar);
  9. }
  10. $(".close",$w).unbind("click").click(function(e) {
  11. $w.widget("destroy");
  12. });
  13. $(".min",$w).unbind("click").click(function(e) {
  14. $w.widget("mini");
  15. });
  16. $(".prefs",$w).unbind("click").click(function(e) {
  17. $w.widget("prefs");
  18. });
  19. };
Add Comment
Please, Sign In to add comment