Posts Tagged “JavaScript”

This post applies to jQuery UI 1.6rc6 (the preview for jQuery 1.3+), but it probably also works with earlier versions.

If you use themeroller, or simply download the jQuery UI standard code package from the jQuery UI web site, the default font size is set to 1.1em, which, generally speaking, is way too large for most people’s tastes.  I’ve seen a  less than helpful suggestion on how to adjust this, on the examples pages:

<body style="font-size: 62.5%;">

This is pretty bogus, because text inside input boxes doesn’t rescale (at least, not in FireFox,) and it obviously applies to the entire page, when in fact you may want it to just apply to the UI widgets only. You can adjust the scale very easily, though, for all widgets, by  editing the  ui.theme.css file (in the ‘theme’ directory). Just change the font-size property for the .ui-widget selector. The default is 1.1em. I changed mine to 11px.  Like this:

.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana,
 Arial, sans-serif; font-size: 11px; }

There’s a second line, with more specific selectors:  .ui-widget input, select, textarea and button respectively. You will probably want to change that line too.

Tags: , ,

Comments 14 Comments »

FireFox doesn’t have a native global event handler. Here’s how to create one using FireFox’s event-capturing model.

Tags: , , , ,

Comments 4 Comments »

Firebug beta 1.0 is now available. This is by far the best toolbar available for FireFox or IE for debugging web applications. See This blog entry at Sitepoint for more details.  A few  of the features I really like are:

  • The debugger  – identifies exact line of script in error.
  • The HTML view – lets you view contents of externally linked Javascript files, also.
  • The CSS inspector – shows you all ancestor css rules for elements, not just the current CSS rule, so you can see the total effect of the cascade.
  • The ability to change CSS settings on the fly. For example, hover over a color, click on it, then change the RGB value to see another color – it does this for the specific area on the page, as well as in the sheet.
Tags: , ,

Comments 2 Comments »