mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Changes to fancy
This commit is contained in:
@@ -24,6 +24,8 @@ var Nochan = {
|
||||
|
||||
pre_card = $(list_html);
|
||||
|
||||
Nochan.add_backdrop(lists, 0);
|
||||
|
||||
for(x in lists)
|
||||
{
|
||||
|
||||
@@ -84,6 +86,35 @@ var Nochan = {
|
||||
if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
|
||||
}
|
||||
return "";
|
||||
},
|
||||
|
||||
add_backdrop: function(list, i) {
|
||||
console.log(list.length)
|
||||
if(i >= list.length) i = 0;
|
||||
|
||||
var id = list[i][1];
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {id:id},
|
||||
url: "/php/imageblob.php",
|
||||
success: function(data){
|
||||
//data will contain the vote count echoed by the controller i.e.
|
||||
$(".mega").css("opacity", 0);
|
||||
setTimeout(function(){
|
||||
$(".mega").css("background", "url(data:image/png;base64,"+data+")");
|
||||
$(".mega").css("background-size" , "200%");
|
||||
$(".mega").css("opacity", 1);
|
||||
$("#search").attr("placeholder", list[i][3]);
|
||||
},1000);
|
||||
//then append the result where ever you want like
|
||||
//$("span#votes_number").html(data); //data will be containing the vote count which you have echoed from the controller
|
||||
|
||||
}
|
||||
});
|
||||
setTimeout(function(){
|
||||
Nochan.add_backdrop(list, i+1);
|
||||
},6000);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user