Skip to content

Commit

Permalink
0.3.3 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcoulombe committed Mar 4, 2013
1 parent 6d3d6eb commit 30f4646
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
3 changes: 3 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Custom Select Box CSS Style Plugin: jQuery + CSS

Version 0.3.3 (04/03/2013)
* Pass original `customSelectSpan` reference to changed() function

Version 0.3.2 (28/02/2013)
* Patch for incorrect select height caused by 0.3.0
* Support for `disabled` select boxes via customSelectDisabled class
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery.customSelect",
"version": "0.3.2",
"version": "0.3.3",
"main": ["./jquery.customSelect.js", "./jquery.customSelect.min.js"],
"dependencies": {
"jquery": ">=1.7.2"
Expand Down
18 changes: 8 additions & 10 deletions jquery.customSelect.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* jquery.customSelect() - v0.3.2
* jquery.customSelect() - v0.3.3
* http://adam.co/lab/jquery/customselect/
* 2013-02-28
* 2013-03-04
*
* Copyright 2013 Adam Coulombe
* @license http://www.opensource.org/licenses/mit-license.html MIT License
Expand All @@ -18,12 +18,10 @@
mapClass: true,
mapStyle: true
},
changed = function (el) {
var $select = $(el),
currentSelected = $select.find(':selected'),
customSelectSpan = $select.next(),
customSelectSpanInner = customSelectSpan.children(':first'),
html = currentSelected.html() || ' ';
changed = function ($select,customSelectSpan) {
var currentSelected = $select.find(':selected'),
customSelectSpanInner = customSelectSpan.children(':first'),
html = currentSelected.html() || ' ';

customSelectSpanInner.html(html);

Expand Down Expand Up @@ -60,7 +58,7 @@
$select
.addClass('hasCustomSelect')
.on('update', function () {
changed(this);
changed($select,customSelectSpan);

var selectBoxWidth = parseInt($select.outerWidth(), 10) -
(parseInt(customSelectSpan.outerWidth(), 10) -
Expand Down Expand Up @@ -96,7 +94,7 @@
.on('change', function () {
customSelectSpan.addClass('customSelectChanged');

changed(this);
changed($select,customSelectSpan);
})
.on('keyup', function () {
$select.blur();
Expand Down
6 changes: 3 additions & 3 deletions jquery.customSelect.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 30f4646

Please sign in to comment.