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

selectBoxIt doesn't change appearance of drop down #185

Closed
darisz opened this issue Jun 19, 2013 · 1 comment
Closed

selectBoxIt doesn't change appearance of drop down #185

darisz opened this issue Jun 19, 2013 · 1 comment
Assignees
Labels

Comments

@darisz
Copy link

darisz commented Jun 19, 2013

First of all thanks for the ability to change appearance of selectbox component. Locally it works for me but when i try to change "skin" of the dropdown in my project it doesn't work. I added appropriate css and js files. The problem is that part of a page is created after AJAX call and in that part of code I want to change the "skin" of the selectbox. Below is a code and only the last line doesn't work. Any ideas ? :) thanks for the help in advance :).

function handler() {
if(AJAX.readyState == 4 && AJAX.status == 200) {
var json = eval('(' + AJAX.responseText +')');
var div = document.getElementById("details_" + json.id);
div.innerHTML = json.html;
var selectBox = document.getElementById("sel_test");
selectBox.selectBoxIt();
}
}

@ghost ghost assigned gfranko Jun 25, 2013
@gfranko
Copy link
Owner

gfranko commented Jun 25, 2013

I just released SelectBoxIt v3.6.0, which greatly improves the setOption() and setOptions() methods. If you would like to change to a pre-supported theme after your SelectBoxIt widget is instantiated, then you can do something this:

// This assumes that you have jQueryUI CSS on the page
$('select').data('selectBox-selectBoxIt').setOption('theme', 'jqueryui');

If you are trying to change your drop down to a custom theme, then you can call the refresh() method, like this:

// This assumes that you have jQueryUI CSS on the page
$('select').data('selectBox-selectBoxIt').refresh();

@gfranko gfranko closed this as completed Jun 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants