-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
I am trying to create a toggle button to allow users of our app to control notifications. I have this, but it's not working:
$(document).on("pagecreate", "#about", function () {
$('#flipnotify').on('change', function() {
$(this).val() == "off" ? play_int() : play_on();
});
function play_int() {
$('#flipnotify').val();
window.plugins.PushbotsPlugin.toggleNotifications(false);
}
function play_on() {
$('#flipnotify').val();
window.plugins.PushbotsPlugin.toggleNotifications(true);
}
});
The html is a jquery mobile flipswitch:
<label for="flipnotify">Toggle Notifications On/Off:</label>
<select name="flipnotify" id="flipnotify" data-role="flipswitch">
<option value="on">On</option>
<option value="off">Off</option>
</select>
</div>
Any help getting this to work would be appreciated.
Metadata
Metadata
Assignees
Labels
No labels