jquery_chained
jquery_chained copied to clipboard
Add extra type cast to String before call split()
Fix bug when call split() on number Similar to this PR https://github.com/tuupola/jquery_chained/pull/74 but he changed the minified version
Instead of calling data("chained") and casting to String, per the jquery docs, we could call attr("data-chained") instead, and instead of coercing strings into numbers, the String type will be preserved.
I've done that on my own branch and it works.
// var data = $(this).data("chained");
var data = $(this).attr("data-chained");