|
94
|
1 |
var display_state = "player"; |
|
|
2 |
|
|
|
3 |
function toggle_display() { |
|
|
4 |
$j.each(["player","seo_body","seo_meta","links"], function(i,display_str) { |
|
|
5 |
|
|
|
6 |
var div_selector = "#"+display_str+"_code"; |
|
|
7 |
if(display_str == display_state) { |
|
|
8 |
$j(div_selector).show(); |
|
|
9 |
} |
|
|
10 |
else { |
|
|
11 |
$j(div_selector).hide(); |
|
|
12 |
} |
|
|
13 |
}); |
|
|
14 |
} |
|
|
15 |
|
|
|
16 |
$j(document).ready(function(){ |
|
|
17 |
|
|
|
18 |
toggle_display(); |
|
|
19 |
|
|
|
20 |
$j('.ldt_json_link').click(function(e) { |
|
|
21 |
e.preventDefault(); |
|
|
22 |
link = $j(e.target); |
|
|
23 |
$j("#res_link_{{player_id}}").load(link.attr("href")); |
|
|
24 |
$j("#res_link_{{player_id}}").show(); |
|
|
25 |
return false; |
|
|
26 |
}); |
|
|
27 |
|
|
|
28 |
$j('#player_button').click(function(e) { |
|
|
29 |
display_state = "player"; |
|
|
30 |
toggle_display(); |
|
|
31 |
}); |
|
|
32 |
$j('#seo_body_button').click(function(e) { |
|
|
33 |
display_state = "seo_body"; |
|
|
34 |
toggle_display(); |
|
|
35 |
}); |
|
|
36 |
$j('#seo_meta_button').click(function(e) { |
|
|
37 |
display_state = "seo_meta"; |
|
|
38 |
toggle_display(); |
|
|
39 |
}); |
|
|
40 |
$j('#links_button').click(function(e) { |
|
|
41 |
display_state = "links"; |
|
|
42 |
toggle_display(); |
|
|
43 |
}); |
|
|
44 |
|
|
|
45 |
$j("#copy_button").click(function(e) { |
|
|
46 |
alert($j("#"+display_state+"_code").html()); |
|
|
47 |
}); |
|
|
48 |
|
|
|
49 |
}); |