Problem with updating data-icon when clicked
Hello all,
My experience with jQuery (mobile) is limited, but I'm learning! I can't get something to work. When I click on the word menu, I want a panel to open. That works. But I also want the data-icon to change from arrow-r to arrow-l. That I can't. I hope someone can help me with that. Here's the code I already have:
<div data-role="panel" id="mypanel" data-position="left" data-display="push" data-position-fixed="true" data-dismissible="true" data-theme="b">
<a href="#open-menu" data-rel="close" data-role="button" data-theme="b" data-icon="delete" data-inline="true">close</a>
</div>
<div data-role="header" data-theme="b">
<a href="#mypanel" id="open-menu" data-icon="arrow-r">menu</a>
</div>
Many thanks in advance!