id="+strength.cat_id+","+strength.sub_cat_id+"
the id will be like this id=4,20
$("#weakTable").on('click', '.skillTestRemider', function () {
var skillTetCatAndSubCat = $(this).attr('id');
in this variable, i have a string like this 4,20 in this 4 is a category and 20 is a subcategory.
I want to split up as diff variables like shown below. how can I do that..?
var cat = 4
var subcat = 20