Created
December 19, 2012 15:15
-
-
Save RemiBa/4337411 to your computer and use it in GitHub Desktop.
Updating my filter selects not working... why is that?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
selectionChanges(); | |
}); | |
function selectionChanges(){ | |
$('#filters select').change(function(){ | |
//Do some stuff and do an ajax request | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def show | |
#Do some things here | |
@properties | |
@newproperties | |
#Respond with the right format | |
respond_to do |format| | |
format.html | |
format.js | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#filters').html('<%= escape_javascript(render :partial => "filterselect2") %>'); | |
selectionChanges(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment