use more flexible way to get the id of the <div>

this let use of more complex widget than a simple <input> in <div> child
This commit is contained in:
Bruno Clermont 2012-06-06 12:54:52 +03:00
parent 08e489f78d
commit 7d01203e35

View File

@ -5,7 +5,7 @@ $(document).ready(function() {
return false;
});
$(".filterBuilderRemove").click(function() {
var boxName = "#" + $(this).parent().attr('id');
var boxName = "#" + $(this).parents(".filterBox").attr('id');
$(boxName).slideUp();
$(boxName).children("input:text").each(function() {
$(this).val("");