As shown here: But I need help in editing it so that it works for my circumstances.
Sample HTML
& lt; Div class = "row too" & gt; & Lt; Div class = "info" & gt; & Lt; Div class = "square" & gt; CK1 & lt; / Div & gt; & Lt; Div class = "teacher_chin" & gt;老師 & lt; / Div & gt; & Lt; Div class = "teacher_english" & gt; Teacher Name & lt; / Div & gt; & Lt; Div class = "helpful_chine" & gt;助教 & lt; / Div & gt; & Lt; Div class = "help_ng" & gt; Supporting name & lt; / Div & gt; & Lt; Div class = "room" & gt; Room 00 & lt; / Div & gt; & Lt; Div class = "book" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "chapters" & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. CPP = CLS = C1 & amp; C = 1" & gt; & Lt; Span class = "chapters" & gt; One end left; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. CLP? CLS = C1 & C = 2" & gt; & Lt; Span class = "chapters" & gt;二 & lt; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. FHP? CLS = C1 & amp; C = 3" & gt; Span class = "chapters" & gt;三 & lt; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. FP? CLS = C1 & amp; C = 4" & gt; & Lt; Span class = "chapters" & gt;四 & lt; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. CHP? CLS = C1 & amp; C = 5" & gt; & Lt; Span class = "chapters" & gt;五 & lt; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. FHP? CLS = C1 & amp; amp = 6; 6 = 6" & gt; Span class = "chapters" & gt;六 & lt; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Courses / Cantonese / Textbook. CPP? CLS = C1 & C = 7" & gt; & Lt; Span class = "chapters" & gt;七 & lt; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. FP? CLS = C1 & amp; C = 8" & gt; & Lt; Span class = "chapters" & gt;八 & lt; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. CLP? CLS = C1 & amp; F = 9" & gt; & Lt; Span class = "chapters" & gt;九 & lt; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. FP? CLS = C1 & amp; F = 10" & gt; & Lt; Span class = "chapters" & gt;十 & lt; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. CPP? CLS = C1 & amp; F = 11" & gt; & Lt; Span class = "chapters" & gt; The only & lt; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. FHP? CLS = C1 & amp; F = 12" & gt; & Lt; Span class = "chapters" & gt;十二 & lt; / Span & gt; & Lt; / A & gt; & Lt; A href = "../../ Course / Cantonese / Textbook. CLP = CLS = C1 & amp; F = 13" & gt; & Lt; Span class = "chapters" & gt;十三 & lt; / Span & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; Jquery [Tasks in progress] $ (document) .ready (function () {$ (click 'div # (function () (var $ nextDiv = $ (this ) .next (); var $ visibleSiblings = $ nextDiv.siblings ('Div: visible'); if ($ visibleSiblings.length) {$ visibleSiblings.length} {$ visibleSiblings.slideUp ('sharp', function () {$ NextDiv.slideToggle ('sharp');});} and {$ nextDiv.slideToggle ('fast');}}}}};
So when the end user div.book Clicks on, div.chapters will expand, and only one Div Chapter will be shown at a time, so if a div.chapters are already open, then the user Before animating the clicked it will first close an open.
Comments
Post a Comment