Created
November 3, 2011 22:14
-
-
Save dpmccabe/1337962 to your computer and use it in GitHub Desktop.
This file contains 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
//Jay's additions to Active Admin: | |
$(document).ready(function() { | |
function changeSubcategories(selection) { | |
// entrance_page = $("#title_bar a:eq(2)").text(); | |
data = { 'data': selection } //, 'entrance_page': ent } | |
$.post("/get_subcategories", data); | |
} | |
//changeSubcategories(); | |
$("#entrance_page_source_category_id").change(function() { | |
changeSubcategories($("#entrance_page_source_category_id option:selected").text()); | |
}); | |
$("#_source_category").change(function() { | |
changeSubcategories($("#_source_category option:selected").text()); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment