Problem with jquery code (newbie) -


I am very new to jquery and I have a problem with which I need help.
I have created a news section on my page, on the left, there is a list of news items, once an item is clicked, the details are open on the right, everything works fine except that I saw that I am instructing and the details which are not inactive, we say that I have 10 times news items, there will be 10 related details on each other, they are invisible until the item is clicked and They become visible. I have the problem that there are links in each description and once the extension is activated, I can still see the links of other people who should be idle (see = if I place a mouse there, So it shows that there is a link there. How can I remove passive details so that it can not be?

This is my code:

HTML

  & lt; div id = "overlay_news" & gt; & lt; h3 & gt; & lt; a href = "#" & gt; item 1 & lt; / a & gt;  Div category = "news_text"> 

item 1

gt; & lt; p & gt; extension1 & lt; a href = "Link1.com" & gt; & Lt; / A & gt; & Lt; / P & gt; & Lt; / Div & gt; & Lt; H3 & gt; & Lt; A href = "#" & gt; Item 2 & lt; / A & gt; & Lt; / H3 & gt; & Lt; Div class = "news_text" & gt; & Lt; H4 & gt; Item 2 & lt; H4 & gt; & Lt; P & gt; Expansion 2 & lt; A href = "link1.com" & gt; & Lt; / A & gt; & Lt; / P & gt; & Lt; / Div & gt;

JQUERY

$ ("#Overlay_news div"). Css ({opacity: 0}); Click ($ ("# overlay_news h3 a") (function () {$ (this) .addClass ("news_active";) ($) () () "Basic" ("A"). Children ("A") Remove class ("news_active"); $ (this) .print (). Siblings ("div"). {Obscurity: 0}, 100); / * Problem here / / $ (this). Parent (). Next ("div") Chetan ({opacity: .8}, 400); Return to London School of Economics;}); The line I have commented is where I feel that instead of changing the opacity with 0, I should delete the div so that only active divas should be shown.

Any help?

  $ ("# overlay_news div") .css ({opacity: 0}); $ ("#OverlayNewsH3A") Click (function) ($ (this) .addClass ("news_active"); $ (this) .Parent (). Sister ("H3"). Children ("a") .removeClass ("news_active") ; $ (This) .Parent (). Sister ("div"). Animate ({opacity: 0}, 100, function () {$ (this) .css ("display", "none");} ); $ (This) .Parent (). Next ("div"). CSS ("display", "block"). ({Obscurity: .8}, 400); return false;});  

Does this work? BTW, please format your code in a slightly neat way.


Comments