This is my code:
function togglePOIAndDisplay(toggle){
var display = $(toggle).attr(\'data-icon\');
console.log(display);
if(display == \'minus\'
If the icon is inside a button like this:
Button
You can change the icon with the buttonMarkup function:
$('#buttonID').buttonMarkup({ icon: "check" });
Or to your custom icon:
$('#buttonID').buttonMarkup({ icon: "my-icon" });
Example: http://jsfiddle.net/u8fnJ/1/
As shown in this post How to refresh a button in a header with jQueryMobile?