X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/d075fc4c1f3e7a17b4c71e7a06fd6cf318e0ef2f..e05b549f8c2c633b951a6aa19e725a4d5d8a5551:/app/views/site/_sidebar.html.erb diff --git a/app/views/site/_sidebar.html.erb b/app/views/site/_sidebar.html.erb index f7e7229c8..3b1b547b6 100644 --- a/app/views/site/_sidebar.html.erb +++ b/app/views/site/_sidebar.html.erb @@ -21,12 +21,12 @@ onclose = null; } - if (options.title) { $("sidebar_title").innerHTML = options.title; } + if (options.title) { $("#sidebar_title").html(options.title); } - if (options.width) { $("sidebar").style.width = options.width; } - else { $("sidebar").style.width = "30%"; } + if (options.width) { $("#sidebar").width(options.width); } + else { $("#sidebar").width("30%"); } - $("sidebar").style.display = "block"; + $("#sidebar").css("display", "block"); <%= onopen %> @@ -34,7 +34,7 @@ } function closeSidebar() { - $("sidebar").style.display = "none"; + $("#sidebar").css("display", "none"); <%= onclose %> @@ -45,8 +45,8 @@ } function updateSidebar(title, content) { - $("sidebar_title").innerHTML = title; - $("sidebar_content").innerHTML = content; + $("#sidebar_title").html(title); + $("#sidebar_content").html(content); } // -->