1 | $(document).ready(function(){
|
---|
2 |
|
---|
3 | //function () {
|
---|
4 | $('a.minmax').bind('click', toggleContent);
|
---|
5 | $('a.remove').bind('click', removeContent);
|
---|
6 | $('div.blockWrapper').sortable(
|
---|
7 | {
|
---|
8 | accept: 'block',
|
---|
9 | helperclass: 'sortHelper',
|
---|
10 | activeclass : 'sortableactive',
|
---|
11 | hoverclass : 'sortablehover',
|
---|
12 | handle: 'div.header',
|
---|
13 | tolerance: 'pointer',
|
---|
14 | onChange : function(ser)
|
---|
15 | {
|
---|
16 | },
|
---|
17 | onStart : function()
|
---|
18 | {
|
---|
19 | $.iAutoscroller.start(this, document.getElementsByTagName('body'));
|
---|
20 | },
|
---|
21 | onStop : function()
|
---|
22 | {
|
---|
23 | $.iAutoscroller.stop();
|
---|
24 | }
|
---|
25 | }
|
---|
26 | );
|
---|
27 | //}
|
---|
28 | //};
|
---|
29 |
|
---|
30 | $(".block").mouseover(function() {
|
---|
31 | //$(this).parents().animate({ backgroundColor: "white" }, 500);
|
---|
32 | //$(this).animate({ backgroundColor: "yellow" }, 50);
|
---|
33 | $(this).parents().css("border", "");
|
---|
34 | $(this).css("border", "1px solid blue");
|
---|
35 | }).mouseout(function(){
|
---|
36 | //$(this).animate({ backgroundColor: "white" }, 500);
|
---|
37 | $(this).css("border", "");
|
---|
38 | });
|
---|
39 |
|
---|
40 |
|
---|
41 | $("button").click(function () {
|
---|
42 | //var parentTag = $(this).parent().get(0).titleName;
|
---|
43 | //alert("Removing div " + parentTag);
|
---|
44 | $(this).parent().parent().remove();
|
---|
45 | });
|
---|
46 |
|
---|
47 | });
|
---|
48 |
|
---|
49 | var removeContent = (function () {
|
---|
50 | //var parentTag = $(this).parent().get(0).titleName;
|
---|
51 | //alert("Removing div " + parentTag);
|
---|
52 | $(this).parent().parent().remove();
|
---|
53 | });
|
---|
54 |
|
---|
55 |
|
---|
56 | var toggleContent = function(e)
|
---|
57 | {
|
---|
58 | var targetContent = $('div.content', this.parentNode.parentNode);
|
---|
59 | if (targetContent.css('display') == 'none') {
|
---|
60 | targetContent.slideDown(300);
|
---|
61 | $(this).html('[-]');
|
---|
62 | } else {
|
---|
63 | targetContent.slideUp(300);
|
---|
64 | $(this).html('[+]');
|
---|
65 | }
|
---|
66 | return false;
|
---|
67 | };
|
---|
68 |
|
---|
69 | function serialize(s)
|
---|
70 | {
|
---|
71 | serial = $.SortSerialize(s);
|
---|
72 | alert(serial.hash);
|
---|
73 | };
|
---|
74 |
|
---|
75 |
|
---|