This is my code:
function togglePOIAndDisplay(toggle){ var display = $(toggle).attr(\'data-icon\'); console.log(display); if(display == \'minus\'
http://jsfiddle.net/phillpafford/8pwFK/29/
change custom icon to star icon.
$(this).attr('data-icon','star'); $(this).find('.ui-icon').removeClass('ui-icon-custom').addClass('ui-icon-star');
this example is easy to study.