Use jQuery chaining
This commit is contained in:
parent
05eba79008
commit
6255c96130
1 changed files with 4 additions and 10 deletions
|
@ -5,18 +5,12 @@ function openSidebar(options) {
|
||||||
|
|
||||||
if (options.title) { $("#sidebar_title").html(options.title); }
|
if (options.title) { $("#sidebar_title").html(options.title); }
|
||||||
|
|
||||||
if (options.width) { $("#sidebar").width(options.width); }
|
$("#sidebar").width(options.width || "30%");
|
||||||
else { $("#sidebar").width("30%"); }
|
$("#sidebar").css("display", "block").trigger("opened");
|
||||||
|
}
|
||||||
$("#sidebar").css("display", "block");
|
|
||||||
|
|
||||||
$("#sidebar").trigger("opened");
|
|
||||||
};
|
|
||||||
|
|
||||||
function closeSidebar() {
|
function closeSidebar() {
|
||||||
$("#sidebar").css("display", "none");
|
$("#sidebar").css("display", "none").trigger("closed");
|
||||||
|
|
||||||
$("#sidebar").trigger("closed");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue