// Otherwise, use a combination of blur and focus event handlers and a placeholder class
else {
jQuery(this).each( function() {
- $input = jQuery(this);
+ var $input = jQuery(this);
$input
// Show on blur if empty
.bind( 'blur', function() {
* JavaScript for Special:Preferences
*/
-$( '#prefsubmit' ).attr( 'id', 'prefcontrol' ).end()
+$( '#prefsubmit' ).attr( 'id', 'prefcontrol' );
$( '#preferences' )
.addClass( 'jsprefs' )
.before( $( '<ul id="preftoc"></ul>' ) )
- .find( '> fieldset' )
+ .children( 'fieldset' )
.hide()
.addClass( 'prefsection' )
- .find( '> legend' )
+ .children( 'legend' )
.addClass( 'mainLegend' )
.each( function( i ) {
$(this).parent().attr( 'id', 'prefsection-' + i );