I am having trouble with the push notification service.
I am trying add an event upon the push notification being recieved. When a push notification is recieved I would like for the app to set an html component visible and add html code.
This is what i have upon the push notification event :
alert (data.aps.alert);
Appery("htmlLabel").show();
$('#htmlLabel').show();
Appery('htmlLabel').append('<!--<div class = "ticker-container" --');
Appery('htmlLabel').append('<!--<div class = "ticker-text" --');
Appery('htmlLabel').append(data.aps.alert);
//Appery('htmlLabel').append("HEY");
Appery('htmlLabel').append('<!--< --');
Appery('htmlLabel').append('<!--< --');
var width = $('.ticker-text').text().length;
var containerwidth = $('.ticker-container').width(),
left = containerwidth;
$(document).ready(function(e){
function tick() {
Code: Select all
if(--left/1.5 < -width*2-150){
left = containerwidth;
}
$(".ticker-text").css("margin-left", left + "px");
setTimeout(tick, 16);
}
tick(); });