Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot set property 'selected' of undefined #15

Open
binoyav opened this issue Apr 11, 2012 · 1 comment
Open

Uncaught TypeError: Cannot set property 'selected' of undefined #15

binoyav opened this issue Apr 11, 2012 · 1 comment

Comments

@binoyav
Copy link

binoyav commented Apr 11, 2012

Showing error for the following drop down
<select name="data[Album][album_date][day]" class="sparkbox-custom">
<option value="">DD</option>
<option value="01">1</option>
<option value="02">2</option>
</select>

If the key is 1, 2 it is working... Otherwise it is showing error "Uncaught TypeError: Cannot set property 'selected' of undefined" on jquery.sparkbox-select.js at line 35

@binoyav
Copy link
Author

binoyav commented Apr 11, 2012

If I change the line 31 to $option = $('.sb-custom[data-id=' + id + ']').find('option').filter('[value="' + $target.parent().attr('data-value') + '"]'); it is working fine... $target.parent().data('value') is only considering 01 as 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant