zurb-foundation 4.0.4 → 4.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/CHANGELOG.md +26 -2
  2. data/CONTRIBUTING.md +0 -8
  3. data/Gemfile.lock +2 -2
  4. data/docs/_sidebar-components.html.erb +1 -0
  5. data/docs/_sidebar.html.erb +1 -0
  6. data/docs/changelog.html.erb +29 -1
  7. data/docs/components/block-grid.html.erb +11 -2
  8. data/docs/components/clearing.html.erb +1 -1
  9. data/docs/components/custom-forms.html.erb +14 -13
  10. data/docs/components/dropdown.html.erb +1 -1
  11. data/docs/components/flex-video.html.erb +1 -1
  12. data/docs/components/grid.html.erb +2 -2
  13. data/docs/components/joyride.html.erb +1 -1
  14. data/docs/components/magellan.html.erb +1 -1
  15. data/docs/components/orbit.html.erb +5 -1
  16. data/docs/components/pricing-tables.html.erb +3 -3
  17. data/docs/components/progress-bars.html.erb +1 -0
  18. data/docs/components/reveal.html.erb +5 -1
  19. data/docs/components/section.html.erb +66 -4
  20. data/docs/components/split-buttons.html.erb +11 -11
  21. data/docs/components/tooltips.html.erb +1 -1
  22. data/docs/components/top-bar.html.erb +4 -2
  23. data/docs/components/type.html.erb +7 -1
  24. data/docs/components/visibility.html.erb +17 -11
  25. data/docs/javascript.html.erb +1 -1
  26. data/docs/layout.html.erb +3 -3
  27. data/docs/media-queries.html.erb +96 -0
  28. data/docs/sass.html.erb +82 -2
  29. data/foundation.gemspec +1 -1
  30. data/js/foundation/foundation.forms.js +6 -14
  31. data/js/foundation/foundation.joyride.js +12 -10
  32. data/js/foundation/foundation.orbit.js +2 -0
  33. data/js/foundation/foundation.section.js +61 -4
  34. data/js/foundation/foundation.topbar.js +9 -2
  35. data/js/vendor/zepto.js +415 -313
  36. data/lib/foundation/version.rb +1 -1
  37. data/scss/foundation/_foundation-global.scss +4 -0
  38. data/scss/foundation/components/_block-grid.scss +4 -4
  39. data/scss/foundation/components/_button-groups.scss +4 -4
  40. data/scss/foundation/components/_buttons.scss +2 -1
  41. data/scss/foundation/components/_custom-forms.scss +1 -1
  42. data/scss/foundation/components/_forms.scss +3 -4
  43. data/scss/foundation/components/_global.scss +11 -8
  44. data/scss/foundation/components/_magellan.scss +7 -2
  45. data/scss/foundation/components/_orbit.scss +6 -3
  46. data/scss/foundation/components/_progress-bars.scss +6 -4
  47. data/scss/foundation/components/_section.scss +48 -1
  48. data/scss/foundation/components/_top-bar.scss +15 -14
  49. data/scss/foundation/components/_type.scss +3 -3
  50. data/scss/foundation/components/_visibility.scss +259 -55
  51. data/templates/project/scss/_settings.scss +7 -0
  52. metadata +6 -6
  53. data/docs/_zurb-jobs.html.erb +0 -5
@@ -33,19 +33,19 @@
33
33
 
34
34
  <%= code_example '
35
35
  <!-- Size Classes -->
36
- <a href="#" class="button split">Default Button</a>
37
- <a href="#" class="tiny button split">Tiny Button</a>
38
- <a href="#" class="small button split">Small Button</a>
39
- <a href="#" class="large button split">Large Button</a>
36
+ <a href="#" class="button split">Default Button <span></span></a>
37
+ <a href="#" class="tiny button split">Tiny Button <span></span></a>
38
+ <a href="#" class="small button split">Small Button <span></span></a>
39
+ <a href="#" class="large button split">Large Button <span></span></a>
40
40
 
41
41
  <!-- Color Classes -->
42
- <a href="#" class="button split secondary">Secondary Button</a>
43
- <a href="#" class="button split success">Success Button</a>
44
- <a href="#" class="button split alert">Alert Button</a>
42
+ <a href="#" class="button split secondary">Secondary Button <span></span></a>
43
+ <a href="#" class="button split success">Success Button <span></span></a>
44
+ <a href="#" class="button split alert">Alert Button <span></span></a>
45
45
 
46
46
  <!-- Radius Classes -->
47
- <a href="#" class="button split radius">Radius Button</a>
48
- <a href="#" class="button split round">Round Button</a>
47
+ <a href="#" class="button split radius">Radius Button <span></span></a>
48
+ <a href="#" class="button split round">Round Button <span></span></a>
49
49
  ', :html %>
50
50
 
51
51
  <p>You may chain one class from each group to build up desired default styles. For these styles to take effect, make sure you have the <strong>default Foundation CSS package</strong> or that you've selected <strong>split buttons from a custom package</strong>. These should be linked up following our default <a href="#getting-started">HTML page structure</a>.</p>
@@ -62,7 +62,7 @@
62
62
  <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like, just make sure you follow our markup structure:</p>
63
63
 
64
64
  <%= code_example '
65
- <a href="#" class="your-class-name">Split Button Text</a>
65
+ <a href="#" class="your-class-name">Split Button Text <span></span></a>
66
66
  ', :html %>
67
67
 
68
68
  <h5>Quick Mixin</h5>
@@ -154,7 +154,7 @@ $split-button-pip-left-lrg: emCalc(-9px);
154
154
  <p>To create a dropdown, you'll need to attach a data-attribute to whatever element you want the dropdown attached to (in this case a button). From there, you'll create a list that holds the links or content and add another data-attribute that associates with the element it belongs to. Here's an example of that markup:</p>
155
155
 
156
156
  <%= code_example '
157
- <a href="#" data-dropdown="drop1" class="button dropdown">Dropdown Button</a><br>
157
+ <a href="#" data-dropdown="drop1" class="button dropdown">Dropdown Button <span data-dropdown="drop1"></span></a><br>
158
158
 
159
159
  <ul id="drop1" class="f-dropdown">
160
160
  <li><a href="#">This is a link</a></li>
@@ -64,7 +64,7 @@
64
64
  + Foundation.libs.tooltips.settings.tooltipClass.substring(1)
65
65
  + '\">' + content + '<span class=\"nub\"></span></span>';
66
66
  }
67
- }", :json %>
67
+ }", :js %>
68
68
 
69
69
  </div>
70
70
  </div>
@@ -63,7 +63,7 @@
63
63
  </ul>
64
64
  <!-- Right Nav Section -->
65
65
  <ul class="right">
66
- <li class="divider"></li>
66
+ <li class="divider hide-for-small"></li>
67
67
  <li><a href="#">Item 2</a></li>
68
68
  </ul>
69
69
  </section>
@@ -273,8 +273,10 @@ $topbar-breakpoint: emCalc(940px); // Change to 9999px for always mobile layout'
273
273
  {
274
274
  index : 0,
275
275
  stickyClass : 'sticky',
276
+ custom_back_text: true, // Set this to false and it will pull the top level link name as the back text
277
+ back_text: 'Back', // Define what you want your custom back text to be if custom_back_text: true
276
278
  init : false
277
- }", :json %>
279
+ }", :js %>
278
280
  </div>
279
281
  </div>
280
282
  </div>
@@ -155,7 +155,13 @@
155
155
  <h6>Ordered Lists</h6>
156
156
  <ol>
157
157
  <li>List Item 1</li>
158
- <li>List Item 2</li>
158
+ <li>List Item 2
159
+ <ol>
160
+ <li>Nested List Item</li>
161
+ <li>Nested List Item</li>
162
+ <li>Nested List Item</li>
163
+ </ol>
164
+ </li>
159
165
  <li>List Item 3</li>
160
166
  </ol>
161
167
  </div>
@@ -18,23 +18,25 @@
18
18
  <p class="panel">
19
19
  <strong class="show-for-small">You are on a small screen.</strong>
20
20
  <strong class="show-for-medium">You are on a medium screen.</strong>
21
- <strong class="show-for-medium-up">You are on a medium or larger screen.</strong>
22
- <strong class="show-for-medium-down">You are on a medium or smaller screen.</strong>
21
+ <strong class="show-for-medium-up">You are on a medium, large or xlarge screen.</strong>
22
+ <strong class="show-for-medium-down">You are on a medium or small screen.</strong>
23
23
  <strong class="show-for-large">You are on a large screen.</strong>
24
- <strong class="show-for-large-up">You are on a large or bigger screen.</strong>
25
- <strong class="show-for-large-down">You are on a large or smaller screen.</strong>
24
+ <strong class="show-for-large-up">You are on a large or xlarge screen.</strong>
25
+ <strong class="show-for-large-down">You are on a large, medium or small screen.</strong>
26
+ <strong class="show-for-xlarge">You are on a xlarge screen.</strong>
26
27
  </p>
27
28
 
28
29
  <h5>Screen Size Visibility Control (Hide)</h5>
29
30
  <p>The following text should describe the screen size you aren't using:</p>
30
31
  <p class="panel">
31
- <strong class="hide-for-small">You are not on a small screen.</strong>
32
- <strong class="hide-for-medium">You are not on a medium screen.</strong>
33
- <strong class="hide-for-medium-up">You are not on a medium or larger screen.</strong>
34
- <strong class="hide-for-medium-down">You are not on a medium or smaller screen.</strong>
35
- <strong class="hide-for-large">You are not on a large screen.</strong>
36
- <strong class="hide-for-large-up">You are not on a large or bigger screen.</strong>
37
- <strong class="hide-for-large-down">You are not on a large or smaller screen.</strong>
32
+ <strong class="hide-for-small">You are <em>not</em> on a small screen.</strong>
33
+ <strong class="hide-for-medium">You are <em>not</em> on a medium screen.</strong>
34
+ <strong class="hide-for-medium-up">You are <em>not</em> on a medium, large or xlarge screen.</strong>
35
+ <strong class="hide-for-medium-down">You are <em>not</em> on a medium or small screen.</strong>
36
+ <strong class="hide-for-large">You are <em>not</em> on a large screen.</strong>
37
+ <strong class="hide-for-large-up">You are <em>not</em> on a large or xlarge screen.</strong>
38
+ <strong class="hide-for-large-down">You are <em>not</em> on a large, medium or small screen.</strong>
39
+ <strong class="hide-for-xlarge">You are <em>not</em> on a xlarge screen.</strong>
38
40
  </p>
39
41
 
40
42
  <h5>Orientation Detection</h5>
@@ -65,6 +67,7 @@
65
67
  .show-for-large-down /* Visible from 1440px down */
66
68
  .show-for-large /* Visible between 1280px and 1440px */
67
69
  .show-for-large-up /* Visible from 1440px up */
70
+ .show-for-xlarge /* Visible above 1440px only */
68
71
 
69
72
  /* The hide classes */
70
73
  .hide-for-small /* Hidden up to 768px */
@@ -74,6 +77,7 @@
74
77
  .hide-for-large-down /* Hidden from 1440px down */
75
78
  .hide-for-large /* Hidden between 1280px and 1440px */
76
79
  .hide-for-large-up /* Hidden from 1440px up */
80
+ .hide-for-xlarge /* Hidden above 1440px only */
77
81
 
78
82
  /* The orientation classes */
79
83
  .show-for-landscape /* Visible for landscape orientation */
@@ -86,6 +90,8 @@
86
90
  .hide-for-touch /* Hidden for touch enabled devices */
87
91
  ', :css %>
88
92
 
93
+ <p><strong>Note:</strong> We've also included specific table hide/show visilibity classes that follow the same structure, just prepended with table, thead, th, tbody, tr or td. The display property will go from 'none' to whatever its default display should be.</p>
94
+
89
95
  <hr>
90
96
 
91
97
  <h3>Using SCSS?</h3>
@@ -53,7 +53,7 @@
53
53
  </script>
54
54
  ', :html %>
55
55
 
56
- <p><strong>Note:</strong> We include tested versions of jQuery and Zepto in the Foundation repo to get you started quickly. If you want to build your own version of Zepto, Foundation employs the <i>event</i>, <i>fx</i>, <i>fx_methods</i>, <i>ajax</i>, <i>form</i>, <i>assets</i>, <i>data</i>, <i>selector</i>, and <i>stack</i> modules.</p>
56
+ <p><strong>Note:</strong> We include tested versions of jQuery and Zepto in the Foundation repo to get you started quickly. If you want to build your own version of Zepto, Foundation employs the <i>fx_methods</i>, <i>assets</i>, <i>data</i>, <i>selector</i>, and <i>stack</i> modules.</p>
57
57
 
58
58
  <hr>
59
59
 
data/docs/layout.html.erb CHANGED
@@ -3,7 +3,7 @@
3
3
  <!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]-->
4
4
  <head>
5
5
  <meta charset="utf-8" />
6
- <meta name="viewport" content="width=device-width" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Foundation Docs: <%= @page_title %></title>
8
8
  <link rel="stylesheet" href="<%= asset_path %>/normalize.css" />
9
9
  <link rel="stylesheet" href="<%= asset_path %>/docs.css" />
@@ -34,7 +34,7 @@
34
34
  <li><a href="<%= docs_path %>">Docs</a></li>
35
35
  <li class="divider"></li>
36
36
  <li class="has-form">
37
- <a href="http://foundation.zurb.com/docs" class="button">Get Started</a>
37
+ <a href="http://foundation.zurb.com/docs" class="button">Getting Started</a>
38
38
  </li>
39
39
  </ul>
40
40
  </section>
@@ -64,7 +64,7 @@
64
64
 
65
65
  <div class="large-4 columns">
66
66
  <h6><strong>Need some help?</strong></h6>
67
- <p>For answers or help visit the <a href="support.html">Support page</a>.</p>
67
+ <p>For answers or help visit the <a href="http://foundation.zurb.com/docs/support.html">Support page</a>.</p>
68
68
  </div>
69
69
  </footer>
70
70
 
@@ -0,0 +1,96 @@
1
+ <% @side_nav = "using" %>
2
+ <% @page_title = "Media Queries" %>
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <div class="row">
7
+ <div class="large-12 columns">
8
+ <h2><%= @page_title %></h2>
9
+ <h4 class="subheader">We keep media queries fairly simple in Foundation and let the percentage-based grid do the heavy lifting across various screen sizes.</h4>
10
+
11
+ <hr>
12
+
13
+ <h4>Working with Media Queries and CSS</h4>
14
+ <p>In CSS, media queries are easily written with a specific syntax. We only use one major breakpoint for the grid in Foundation to shift layouts for screens above 768px wide. The rest of the media queries are used for visibility classes. The following snippet shows you each of the media queries used in Foundation:</p>
15
+
16
+ <%= code_example '
17
+ /* We use this media query to add styles to any device that supports media queries */
18
+ @media only screen { }
19
+
20
+ /* Used to alter styles for screens at least 768px wide. This is where the grid changes. */
21
+ @media only screen and (min-width: 768px) {}
22
+
23
+ /* Used to alter styles for screens at least 1280px wide. */
24
+ @media only screen and (min-width: 1280px) {}
25
+
26
+ /* Used to alter styles for screens at least 1440px wide. */
27
+ @media only screen and (min-width: 1440px) {}
28
+
29
+ /* Apply styles to screens in landscape orientation */
30
+ @media only screen and (orientation: landscape) {}
31
+
32
+ /* Apply styles to screens in portrait orientation */
33
+ @media only screen and (orientation: portrait) {}
34
+
35
+ /* We also use Modernizr to add a .touch class to the body when applicable */
36
+ /* You can prepend this class to anything and it will style only for touch devices */
37
+ .touch .your-element {}
38
+ ', :css %>
39
+
40
+ <h4>Working with Media Queries and SCSS</h4>
41
+ <p>You can go ahead and use any of the CSS media queries in your SCSS files, but we've also made it easier with some handy variables you can use instead! Those variables are:</p>
42
+
43
+ <%= code_example '
44
+ /* Available Variables */
45
+ $small-screen: emCalc(768px);
46
+ $medium-screen: emCalc(1280px);
47
+ $large-screen: emCalc(1440px);
48
+
49
+ $screen: "only screen";
50
+ $small: "only screen and (min-width:"#{$small-screen}")";
51
+ $medium: "only screen and (min-width:"#{$medium-screen}")";
52
+ $large: "only screen and (min-width:"#{$large-screen}")";
53
+ $landscape: "only screen and (orientation: landscape)";
54
+ $portrait: "only screen and (orientation: portrait)";
55
+
56
+ /* We use this media query to add styles to any device that supports media queries */
57
+ @media #{$screen} { }
58
+
59
+ /* Used to alter styles for screens at least 768px wide. This is where the grid changes. */
60
+ @media #{$small} { }
61
+
62
+ /* Used to alter styles for screens at least 1280px wide. */
63
+ @media #{$medium} { }
64
+
65
+ /* Used to alter styles for screens at least 1440px wide. */
66
+ @media #{$large} { }
67
+
68
+ /* Apply styles to screens in landscape orientation */
69
+ @media #{$landscape} { }
70
+
71
+ /* Apply styles to screens in portrait orientation */
72
+ @media #{$portrait} { }
73
+
74
+ /* We also use Modernizr to add a .touch class to the body when applicable */
75
+ /* You can prepend this class to anything and it will style only for touch devices */
76
+ .touch .your-element {}
77
+ ', :css %>
78
+
79
+ </div>
80
+ </div>
81
+
82
+
83
+ </div>
84
+
85
+ <div class="large-3 pull-9 columns">
86
+ <%= render "_sidebar.html.erb" %>
87
+ </div>
88
+ </div>
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
data/docs/sass.html.erb CHANGED
@@ -39,18 +39,89 @@
39
39
  <li>run <span class="keystroke">compass create &lt;project-name&gt; -r zurb-foundation --using foundation</span></li>
40
40
  </ol>
41
41
 
42
- <br>
42
+ <hr>
43
+
44
+ <h3>Using Sass Standalone</h3>
45
+ <p>With Foundation 4, we've removed all dependencies from the framework. This means you can use Foundaiton with Sass alone and add Compass, Bourbon, or whatever on top of it. To help get going using only Sass, you'll just need to download the <a href="https://github.com/zurb/foundation">files from Github</a> (grab the scss/ and js/ directories) and put them into your project directory. From there you just need to <code>@import</code> the parts of Foundation you need.</p>
46
+
47
+ <p>To import all of Foundation:</p>
48
+ <%= code_example '
49
+ @import "/path/to/foundation";
50
+ ', :css %>
51
+
52
+ <p>If you want to override the built in variables, you can find them on each component page or grab that <a href="https://github.com/zurb/foundation/blob/master/templates/project/scss/_settings.scss">entire list from Github</a>. From there, you'll need to link your settings file above your Foundation import, like so:</p>
53
+
54
+ <%= code_example '
55
+ @import "/path/to/settings";
56
+ @import "/path/to/foundation";
57
+ ', :css %>
58
+
59
+ <p>If you want to pick and choose which pieces of Foundation you want, the pieces you need are:</p>
60
+
61
+ <%= code_example '
62
+ @import "foundation/foundation-global";
63
+ @import "foundation/components/global";
64
+
65
+ /* Each individual part that can be added in */
66
+ @import "foundation/components/grid";
67
+ @import "foundation/components/visibility";
68
+ @import "foundation/components/block-grid";
69
+ @import "foundation/components/type";
70
+ @import "foundation/components/buttons";
71
+ @import "foundation/components/forms";
72
+ @import "foundation/components/custom-forms";
73
+ @import "foundation/components/button-groups";
74
+ @import "foundation/components/dropdown-buttons";
75
+ @import "foundation/components/split-buttons";
76
+ @import "foundation/components/flex-video";
77
+ @import "foundation/components/section";
78
+ @import "foundation/components/top-bar";
79
+ @import "foundation/components/orbit";
80
+ @import "foundation/components/reveal";
81
+ @import "foundation/components/joyride";
82
+ @import "foundation/components/clearing";
83
+ @import "foundation/components/alert-boxes";
84
+ @import "foundation/components/breadcrumbs";
85
+ @import "foundation/components/keystrokes";
86
+ @import "foundation/components/labels";
87
+ @import "foundation/components/inline-lists";
88
+ @import "foundation/components/pagination";
89
+ @import "foundation/components/panels";
90
+ @import "foundation/components/pricing-tables";
91
+ @import "foundation/components/progress-bars";
92
+ @import "foundation/components/side-nav";
93
+ @import "foundation/components/sub-nav";
94
+ @import "foundation/components/switch";
95
+ @import "foundation/components/magellan";
96
+ @import "foundation/components/tables";
97
+ @import "foundation/components/thumbs";
98
+ @import "foundation/components/tooltips";
99
+ @import "foundation/components/dropdown";
100
+ ', :css %>
101
+
102
+ <hr>
43
103
 
44
104
  <div class="row">
45
105
  <div class="large-12 columns">
46
- <h5>Compiling Your Scss</h5>
106
+ <h3>Compiling Your Scss with Compass</h3>
47
107
  <p>To compile your Scss into CSS you run a simple command that will watch for saves and compile each time you save an Scss file. From the directory of your <kbd>config.rb</kbd> file, the command is:</p>
48
108
  <p class="btm-marg keystroke">compass watch</p>
109
+ <br>
49
110
  <p>If you are in a different directory you can use the same command, but navigate to where your <kbd>config.rb</kbd> file is. The command looks like:</p>
50
111
  <p class="btm-marg keystroke">compass watch path/to/project</p>
51
112
  </div>
52
113
  </div>
53
114
 
115
+ <hr>
116
+
117
+ <div class="row">
118
+ <div class="large-12 columns">
119
+ <h3>Compiling Your Scss with Sass</h3>
120
+ <p class="btm-marg keystroke">sass --watch your/scss/directory:your/css/directory</p>
121
+ <br>
122
+ <p>You can watch individual files or the entire directory, we usually watch the entire directory when using Sass standalone.</p>
123
+ </div>
124
+ </div>
54
125
 
55
126
  <hr>
56
127
 
@@ -279,6 +350,15 @@ $include-print-styles: true;
279
350
  &:after { clear: both; }
280
351
  }
281
352
 
353
+ // Media Queries
354
+ $small-screen: emCalc(768px);
355
+ $medium-screen: emCalc(1280px);
356
+ $large-screen: emCalc(1440px);
357
+
358
+ $small: "only screen and (min-width:"#{$small-screen}")" !default;
359
+ $medium: "only screen and (min-width:"#{$medium-screen}")" !default;
360
+ $large: "only screen and (min-width:"#{$large-screen}")" !default;
361
+
282
362
  ', :css %>
283
363
 
284
364
 
data/foundation.gemspec CHANGED
@@ -16,5 +16,5 @@ Gem::Specification.new do |gem|
16
16
  gem.version = Foundation::VERSION
17
17
 
18
18
  gem.add_dependency "sass", [">= 3.2.0"]
19
- gem.add_dependency "rake"
19
+ gem.add_development_dependency "rake"
20
20
  end
@@ -33,11 +33,11 @@
33
33
  },
34
34
 
35
35
  assemble : function () {
36
- $('form.custom input[type="radio"]').not('[data-customforms="disabled"]')
36
+ $('form.custom input[type="radio"]', $(this.scope)).not('[data-customforms="disabled"]')
37
37
  .each(this.append_custom_markup);
38
- $('form.custom input[type="checkbox"]').not('[data-customforms="disabled"]')
38
+ $('form.custom input[type="checkbox"]', $(this.scope)).not('[data-customforms="disabled"]')
39
39
  .each(this.append_custom_markup);
40
- $('form.custom select').not('[data-customforms="disabled"]')
40
+ $('form.custom select', $(this.scope)).not('[data-customforms="disabled"]')
41
41
  .each(this.append_custom_select);
42
42
  },
43
43
 
@@ -45,16 +45,6 @@
45
45
  var self = this;
46
46
 
47
47
  $(this.scope)
48
- .on('click.fndtn.forms', 'form.custom span.custom.checkbox', function (e) {
49
- e.preventDefault();
50
- e.stopPropagation();
51
- self.toggle_checkbox($(this));
52
- })
53
- .on('click.fndtn.forms', 'form.custom span.custom.radio', function (e) {
54
- e.preventDefault();
55
- e.stopPropagation();
56
- self.toggle_radio($(this));
57
- })
58
48
  .on('change.fndtn.forms', 'form.custom select:not([data-customforms="disabled"])', function (e) {
59
49
  self.refresh_custom_select($(this));
60
50
  })
@@ -66,6 +56,7 @@
66
56
  if ($associatedElement.attr('type') === 'checkbox') {
67
57
  e.preventDefault();
68
58
  $customCheckbox = $(this).find('span.custom.checkbox');
59
+
69
60
  //the checkbox might be outside after the label
70
61
  if ($customCheckbox.length == 0) {
71
62
  $customCheckbox = $(this).next('span.custom.checkbox');
@@ -177,6 +168,7 @@
177
168
  $selector = $customSelect.find( ".selector" ),
178
169
  $options = $this.find( 'option' ),
179
170
  $selectedOption = $options.filter( ':selected' ),
171
+ copyClasses = $this.attr('class') ? $this.attr('class').split(' ') : [],
180
172
  maxWidth = 0,
181
173
  liHtml = '',
182
174
  $listItems,
@@ -190,7 +182,7 @@
190
182
  $this.hasClass( 'large' ) ? 'large' :
191
183
  $this.hasClass( 'expand' ) ? 'expand' : '';
192
184
 
193
- $customSelect = $('<div class="' + ['custom', 'dropdown', customSelectSize ].join( ' ' ) + '"><a href="#" class="selector"></a><ul /></div>');
185
+ $customSelect = $('<div class="' + ['custom', 'dropdown', customSelectSize ].concat(copyClasses).filter(function(item, idx,arr){ if(item == '') return false; return arr.indexOf(item) == idx; }).join( ' ' ) + '"><a href="#" class="selector"></a><ul /></div>');
194
186
  $selector = $customSelect.find(".selector");
195
187
  $customList = $customSelect.find("ul");
196
188
  liHtml = $options.map(function() { return "<li>" + $( this ).html() + "</li>"; } ).get().join( '' );