MediaWiki:Mobile.js: Difference between revisions

Correct jQuery syntax by enclosing multiple values in curly braces
(Don't use firstHeading because that's specific to destop. Both Desktop and Mobile will have #content h1)
(Correct jQuery syntax by enclosing multiple values in curly braces)
Line 287: Line 287:
/* code for new landing page */
/* code for new landing page */
// Test if we're on one of the Main Pages. .href works for both straight titles and querystring titles
// Test if we're on one of the Main Pages. .href works for both straight titles and querystring titles
if ( /Main_Page/.test(document.location.href) || /Guided_Research_for_Online_Records/.test(document.location.href) ) {
if ( ( /Main_Page/.test(document.location.href) ) || ( /Guided_Research_for_Online_Records/.test(document.location.href) ) ) {
     $("#content h1").css("border", "0", "textAlign", "center");
     $("#content h1").css({"border":0, "text-align":"center"});
}
}


53,890

edits