PluginProbe
RSVP and Event Management / 1.3.0
RSVP and Event Management v1.3.0
trunk 0.5.0 0.6.0 0.7.0 0.8.0 0.9.0 0.9.5 1.0.0 1.1.0 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.5.0 1.6.0 1.6.1 1.6.2 1.6.5 1.7.0 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 All 136 releases
rsvp / jquery-validate / demo / js / cmxforms.js

cmxforms.js in RSVP and Event Management 1.3.0, at jquery-validate/demo/js/cmxforms.js

24 lines 846 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 // apply inline-box only for mozilla
2 if( jQuery.browser.mozilla ) {
3 // do when DOM is ready
4 $( function() {
5 // search form, hide it, search labels to modify, filter classes nocmx and error
6 $( 'form.cmxform' ).hide().find( 'p>label:not(.nocmx):not(.error)' ).each( function() {
7 var $this = $(this);
8 var labelContent = $this.html();
9 var labelWidth = document.defaultView.getComputedStyle( this, '' ).getPropertyValue( 'width' );
10 // create block element with width of label
11 var labelSpan = $("<span>")
12 .css("display", "block")
13 .width(labelWidth)
14 .html(labelContent);
15 // change display to mozilla specific inline-box
16 $this.css("display", "-moz-inline-box")
17 // remove children
18 .empty()
19 // add span element
20 .append(labelSpan);
21 // show form again
22 }).end().show();
23 });
24 };