User:Krinkle/Scripts/VectorSearchNav.js: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
No edit summary
changing width from px to em. Everything is relative to the font-size :)
Line 11: Line 11:
$j("#custom-search").attr("class", "portal persistent");
$j("#custom-search").attr("class", "portal persistent");
$j("#p-navigation").removeClass("first");
$j("#p-navigation").removeClass("first");
$j("#simpleSearch").attr("class", "body");
$j("#simpleSearch").attr("class", "body").css("width", "8em");
$j("#searchInput").css("width", "90px");
// Fix up the dropdown menu
// Fix up the dropdown menu
$j("div.vectorMenu ul").css("right", "0");
$j("div.vectorMenu ul").css("right", "0");

Revision as of 20:26, 17 February 2011

// Description: Puts the searchbar in the left column in the Vector-skin.
// Author: [[meta:User:Krinkle]]
// Version: 1.04
// URL: http://meta.wikimedia.org/wiki/User:Krinkle/Scripts/VectorSearchNav
// Stats: [[File:Krinkle_VectorSearchNav.js]]
jQuery(function(){ $j = jQuery;
  // Move bar to the left
  $j("#p-search").prependTo("#mw-panel");
  $j("#p-search").attr("id", "custom-search");
  // Make it look better
  $j("#custom-search").attr("class", "portal persistent");
  $j("#p-navigation").removeClass("first");
  $j("#simpleSearch").attr("class", "body").css("width", "8em");
  // Fix up the dropdown menu
  $j("div.vectorMenu ul").css("right", "0");
  $j("#right-navigation").css("margin-right", "1em");
  $j("#custom-search").append('<style type="text/css">#simpleSearch label { left: 0.5em !important; } .suggestions { left: 19px !important; } </style>');
  $j("body > .suggestions").css("left", "19px !important").css("right", "auto !important");
});