I want to add some content to ul class = "overl" whose parent's been clicked and any previous Was that click?
& lt; Html & gt; & Lt; Top & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "testtab.css" /> & Lt; Script type = "text / javascript" src = "script / jquery-1.10.1.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ (Document) .ready (function () {$ ('# chat ul li a'). ('Click', function (e) {($ (this) .innerHTML = ""); // var i = $ (This). Close ('li'). Index ();});}); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "chat" category = "chat" & gt; & Lt; Ul class = "chatmenu" & gt; & Lt; Li id = "one" square = "user" & gt; & Lt; A href = "#in" & gt; Abcy & lt; Span class = "notify" & gt; 1 new * & lt; / Span & gt; & Lt; / A & gt; & Lt; Div class = "chattng" & gt; & Lt; Ul class = "overl" & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; Li id = "two" square = "user" & gt; & Lt; A href = "# two" & gt; AVVV & Lt; Span class = "notify" & gt; A & lt; / Span & gt; & Lt; / A & gt; & Lt; Div class = "chattng" & gt; & Lt; Ul class = "overl" & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; Li id = "three" square = "user" & gt; & Lt; A href = "# three" & gt; GT & Lt; Span class = "notify" & gt; D & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li id = "four" class = "users" & gt; & Lt; A href = "# four" & gt; Trt & lt; Span class = "notify" & gt; E & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; ; & Lt; Li id = "five" square = "user" & gt; & Lt; A href = "# 5" & gt; KKK Lieutenant; Span category = "notify" & gt; F & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; ; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt; Once it is known how to do it, whatever has been clicked gets the internal HTML and the previous link that was clicked, the inner thumb In the form?
Try click at $ (document) .ready ( );
No comments:
Post a Comment