instead of the entire html code of the poll
===========================================================================
In Code Generator
You can specify
data-pdig, data-shorten
data-pos, data-duration
===========================================================================
To load the inital counts
it should be able to load multiple polls in one call
because if you put 100 of polls on a page, it will make 100 accesses.
===========================================================================
Wait Animation for when the connection is slow
===========================================================================
Whitelist and blacklist
allow/disallow access from cetain domains
===========================================================================
[Advanced Topic]
user defined user-id
...
Better do it on the server side like
functin getMyID() {
return $_SESSION["myid"];
}
===========================================================================
[Advanced Topic]
Synchronize polls with the same poll ID
...
CAjaxLikesSys = {
init : function() {
this.list = {};
$('.ld-init').each(function(){
this.register(new CAjaxLikes($(this)));
});
},
register : function( jqo ) {
var jqo_cont = jqo.jqo_cont;
jqo_cont.remove('ld-init');
var tid = jqo_cont.getAttr('data-tid');
if (!( tid in this.list )) {
this.list[tid] = [];
}
this.list[tid].push(jqo);
}
send : function( data ) {
ajax.send(
...............
...............
...............
...............
...............
success : function( resp ) {
if ( resp.tid in this.list ) {
var ls = this.list[resp.tid];
for( var i=0; i