Skip to content

Instantly share code, notes, and snippets.

@mramsden
Created December 17, 2013 11:36
Show Gist options
  • Save mramsden/8003607 to your computer and use it in GitHub Desktop.
Save mramsden/8003607 to your computer and use it in GitHub Desktop.
$(function() {
$(".sort_ajax").on("blur", function() {
var $this = $(this);
if ($this.attr("checked")) {
var data = {};
data.value = $this.siblings("[name='Style_code']").value();
$.post("Product_Range", data, function(data) {
$("#crud_page").trigger("change");
}, html);
}
});
});
<input type="hidden" name="Style_code" value="<?php echo $row->Style_code; ?>">
<input type="checkbox" class="sort_ajax" <?php echo ($value === "1" ? "checked" : "") ?>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment