function get_json data return eval data function next click function u

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function get_json(data) {
return eval('(' + data + ')');
}
$(function(){
$("#next").click(function() {
url = $("#next").attr("href")
last = $("#last").attr("value")
$.ajax(
{
type: 'POST',
url: url,
contentType: 'text/html',
dataType: 'html',
data: {'last': last},
success: function(data2) {
json = get_json(data2)
$("#category_thumbnails").replaceWith(json.html)
}}
)
return false
})
$("#before").click(function() {
url = $("#before").attr("href")
last = $("#last").attr("value")
$.ajax(
{
type: 'POST',
url: url,
data: {'last': last},
success: function(data) {
json = get_json(data)
$("#category_thumbnails").replaceWith(json.html)
}}
)
return false
})
})