no :O( this removes the items. but the accordion does not render correct ...
On 1 Okt., 03:45, plian <plia...@gmail.com> wrote: > hi, hope the following code could help.... > > <div id="accordion"> > <div id="content1"><h3><a href="#">header</a></h3> > <div>content > <a href="javascript:void(0);" onclick="$(this).parents > ('#content1').fadeOut('slow').remove();">Delete</a> > </div> > </div> > <div id="content2"><h3 ><a href="#">header2</a></h3> > <div>content 2 > <a href="javascript:void(0);" onclick="$(this).parents > ('#content2').fadeOut('slow').remove();">Delete</a> > </div> > </div> > </div> > > On Oct 1, 12:47 am, Hundredth Monkey <stephan.a...@googlemail.com> > wrote: > > > thanx for your response . > > but this doesnt work. there simply happens nothing . > > this is my HTML markup. > > > <div id="accordion"> > > <h3><a href="#">header</a></h3> > > <div>content > > <a href="javascript:void(0);" onclick="$(this).parents > > ('div.accordion').fadeOut('slow').remove();">Delete</a> > > </div> > > <h3><a href="#">header2</a></h3> > > <div>content 2 > > <a href="javascript:void(0);" onclick="$(this).parents > > ('div.accordion').fadeOut('slow').remove();">Delete</a> > > </div> > > </div> > > > any idea what I' m doing wrong? > > > I ve also tried to put IDs in the h3 and div elements to remove them > > via $.remove(), but this destroys all other accordion items too :O( > > > On 30 Sep., 18:18, Liam Potter <radioactiv...@gmail.com> wrote: > > > > $(this).parents("div.accordion").fadeOut('slow').remove(); > > > > where div.accordion is what you're trying to remove. > > > > Hundredth Monkey wrote: > > > > hi, > > > > i want to realize a delete button or link within an accordion item. is > > > > it possible to remove a special item or make the header disabled after > > > > a link click within the accordion item content? > > > > so far i' ve tried $(this).parent().fadeOut('slow'); > > > > but this kills all item contents :O( > > > > best regards.