Commits

Anonymous committed c464e09

More refactoring and jQuery-isation of position_divs.js.

Comments (0)

Files changed (1)

src/js/position_divs.js

     var width = client_w - 780;
     var js_site_w_str = width / 2 + 20 + "px";
 
-    document.getElementById("js-site-name").style.left = js_site_w_str;
-    document.getElementById("js-site-slogan").style.left = js_site_w_str;
+    var set_left = function (my_id) { $("#"+my_id).css("left", js_site_w_str);};
+
+    set_left("js-site-name");
+    set_left("js-site-slogan");
 
     // Commenting out because it no longer exists.
     // document.getElementById("js-nav-global").style.right = width / 2 - 20 + "px";
-    if ( document.getElementById("right-sidebar") == null ) {
+    if ( ! $("#right-sidebar")) {
         document.getElementById("content").style.width = client_w - 250 + "px";
     }
     else {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.