javascript - Expand hidden content in newly expanded div -
I have a lot of content that I'm using in one of the frequently asked type setups. When a user clicks on any number of links, then he will expand the section and will reveal a list of items which can be extended themselves too, some of which I am trying to achieve, some of these The list item is to expand, when the range of frequently asked questions is toggled
Then the user clicks on the link that lists the list of items And the focus is set on the exact object content that runs alongside the link Basically, hyperlinks all this stuff like anchor is on one page and a slide toggle is followed by a second slide toggle.
I am trying to complete here:
P>
& lt; H2 & gt; If you want to find out more about this exact thing, try & lt; A href = "#" id = "clicke" & gt; click here! & Lt; / A & gt; & Lt; / H2 & gt; & Lt; Div id = "myHiddenContent" style = "display: none" & gt; & Lt; Li id = "info-block-one" & gt; & Lt; DL & gt; & Lt; DT & gt; & Lt; A aria-haspopup = "true" aria-expanded = "true" href = "# contentblock" id = "infoLink" & gt; & Lt; Strong & gt; Information Block A & lt; / Strong> & Lt; / A & gt; & Lt; / Dt & gt; & Lt; Dd tabindex = "- 1" area-hidden = "wrong" role = "region" style = "display: block;" & Gt; & Lt; P class = "answer" id = "contentbllock" style = "display: none" & gt; Information block answer & lt; / P & gt; & Lt; / Dd> & Lt; / DL & gt; & Lt; / Li & gt; $ ("#infoLink") Click (function () {$ ("#contentBlock"). Slide Toggle ("slow", function () {});}); $ ("#clicke") Click (function () {$ ("#myHiddenContent"). Slide Toggle ("slow", function () {});});
I believe you want something like the following:
$ ("#infoLink"). Click (function () {$ (this) .Parent (next) ("dd"). Children ("# contentblock") Slide Toggle ("Slow", Function () {});}); $ ("#clicke") Click (function () {$ (this) .Parent (.) Next ("# myHiddenContent") Slide Toggle ("slow", function () {});});
Comments
Post a Comment