.hide("explode", {}, 1000);
$(".main-head").on("click", "#next", function(e) {
e.preventDefault();
var template = $("#slider").html(),
id = $(".main-head .id").data('id'),
countdown = $(this).find('a.count'),
cur_count = countdown.data("count"),
slides_count = $('.main-head').data('slides');
$(".main-head .covered").fadeOut(1000, function() {
$.post("/gtc/next", { id: id }, function(resp) {
$(".main-head").html(_.template(template, { item:resp }));
$(".main-head").find('a.count')
.text(cur_count+1+"/"+slides_count)
.data('count', cur_count+1)
.attr('count', cur_count+1);
$(".main-head .covered").fadeIn(1000);
});
});
});
{
"new":"asdsa",
"list":
[
{
"name":"first",
"rating":"50%",
"story":"Once upon a time"
},
{
"name":"second",
"rating":"65%",
"story":"New chapter"
}
]
}
$.getJSON('data.json', function(data){
console.log(data);
});
var snake = {
interval : {
interval_id: null,
right : function (stop){
if (stop) {
return clearInterval(this.interval_id);
}
if (this.interval_id) {
clearInterval(this.interval_id);
}
this.interval_id = setInterval(snake.functions.moveRight, 500);
}
}
}
snake.interval.right();
snake.interval.right(true);
addEvent : function(id, hadler, type) {
addEvent : function(id, handler, type) {
var img = new Image ()
img.src = obj.src
return !img.complete
var cssImageProps = [
'backgroundImage',
'borderImage',
'borderCornerImage',
'listStyleImage',
'cursor'
]
var cssUrlRegex = /url\(\s*(['"]?)(.*?)\1\s*\)/g