jquery - How can I re-create an accordion from a filtered list -
I have an orderer that I populate using a custom list. Although I have a button that kicks a javascript function to filter the list based on values in 3 different drop-downs. It also works but my problem is how to destroy the already existing Aordian and recreate the Appordian with the new filtered list. At the moment, the new list proves the old Adrian (which works at least my filter function). I have tried to use "$ ('# empardian'). Append ('deleted')" But the new list continues to be added at the end of the old list.
Here's how I am generating adrenaline:
while (listItemEnumerator.moveNext ()) {var oListItem = listItemEnumerator.get_current (); ListItemInfo + = '\ Nroom name:' + oListItem.get_item ('title') + '' + 'Building:' + oListItem.get_item ('Building') + '' + 'Floor:' + oListItem.get_item (' Floor ') +' 'Seating:' + oListItem.get_item ('Seating') + '' + 'Phone Number:' + oListItem.get_item ('Phone_x0020_Number') + '' + Book Room: '+ oListItem .get_item ('book_x0020_ room'); . Newdev = "& lt; h3> on" + oListItem.get_item ('title') toString () + '& lt; / H3 & gt; & Lt; Div & gt; & Lt; P & gt; Building: "+ oListItem.get_item ('Building'). ToString () + '& lt; / p & gt; & lt; / br & gt; & lt; p & gt; Floor:". + oListItem.get_item ('floor') toString () + '& lt; / P & gt; & Lt; / Br & gt; & Lt; P & gt; Phone Number: "+ oListItem.get_item ('Phone_x0020_Number') toString () +." & Lt; / P & gt; & Lt; / Br & gt; & Lt; P & gt; General Size:. "+ OListItem.get_item ('General_x0020_Size') toString () + '& lt; / p & gt; & lt; / b & gt; & lt; p & gt; Book Room: & lt; a href =". + OListItem.get_item ('Book_x0020_Room') GET_URL () + "& gt;" + oListItem.get_item ('Book_x0020_Room'). get_description () + "& lt; / a & gt; & lt; / p & gt; & lt; / div & gt;"; $ ('#Edarean') Append (newdev) $ ('#Adarean') Erordian ("refresh"); } I also have this div in the HTML body:
& lt; div id = "accordion" & gt; & Lt; / Div & gt;
I got some help from my boss on this. The empty method was used to use $ ('#accordion'). Blank (); There is really no need for $ ('# accordion') to clear the contents of the Empowerment Divite just before your loop. Accordion ("Refresh"); In my code
Comments
Post a Comment