jquery cookies in edge animate -
so in regular html5 page in ie can following jquery code work:
$.cookie('mycookiex',cookiexcounter,{expires:7,path:'/'}); $.cookie('mycookiey',cookieycounter,{expires:7,path:'/'}); console.log($.cookie('mycookiex'));
but can't code work in edgeactions.js file... tried changing syntax (since when use jquery in edge before i've had change things example:
$('#bluecar').animate({ left:cararrayx[cararrayxcounter] + "px", top:cararrayy[cararrayycounter] + "px" }); '
to
sym.$('bluecar').animate({ left:myvariablex + "px", top:myvariabley + "px" });
but can't figure out cookies in edge jquery them workign... it's probaby syntax thing think of this:
sym. $.cookie('mycookiex',cookiexcounter,{expires:7,path:'/'}); sym. $.cookie('mycookiey',cookieycounter,{expires:7,path:'/'}); console.log($.cookie('mycookiex'));
--------------------------> , of course doesn't work..
please provide thoughts...
i never able plugin jquery-cookies.js work edge animate, should have been simplest cache:
//jquery cookies not working in edge animate: // $.cookie('mycookiex',btnarrayx,{expires:7,path:'/'}); // $.cookie('mycookiey',btnarrayy,{expires:7,path:'/'}); //console.log($.cookie('mycookiex'));
but did javascript (taken user on stackoverflow) work edge animate:
//set cookie function createcookie(name,value,days) { if (days) { var date = new date(); date.settime(date.gettime()+(days*24*60*60*1000)); var expires = "; expires="+date.togmtstring(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } createcookie('ppkcookie',btnarrayx,7); //read cookie function readcookie(name) { var nameeq = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charat(0)==' ') c = c.substring(1,c.length); if (c.indexof(nameeq) == 0) return c.substring(nameeq.length,c.length); } return null; } var yaycookie = readcookie('ppkcookie'); console.log('yaycookie' + yaycookie);
so, guess trying read/set cookie in edge animate... it's still possible jquery plugin, don't know correct syntax make edge animate compatible.. news straight javascript (although longer) works fine :)
Comments
Post a Comment