Click here to Skip to main content
16,015,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i have a jquery accordions and a button.
when the button is clicked,one of the accordions can be deleted.
i dont know how can i do this
this is my code:

<head>
  <link href="jquery-ui.css" rel="stylesheet" type="text/css"/>
  <script src="jquery.min.js"></script>
  <script src="jquery-ui.min.js"></script>
  
  <script>
      $(document).ready(function () {
          $("#accordion").accordion();
      });
  </script>
</head>
<body style="font-size:62.5%;">
  

    <form id="form1" runat="server">
  

<div id="accordion">

	<h3><a href="#">Section 1</a></h3>
	<div>
		<p>
		Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. 
		</p>
	</div>

	<h3><a href="#">Section 2</a></h3>
	<div>
		<p>
		Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
		purus. .
		</p>
	</div>
	<h3><a href="#">Section 3</a></h3>
	<div>
		<p>
		Nam enim risus, molestie et, porta ac, aliquam ac, risus. 
		</p>
		<ul>
			<li>List item one</li>
			<li>List item two</li>
			<li>List item three</li>
		</ul>
	</div>
	<h3><a href="#">Section 4</a></h3>
	<div>

		<p>
		Cras dictum. Pellentesque habitant morbi tristique senectus et netus
		et malesuada fames ac turpis egestas.
		</p>
		<p>
		Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
		</p>
	</div>
</div>

    <asp:Button ID="Button1" runat="server" Text="Button" />
    </form>
</body>
Posted
Updated 4-Feb-12 22:23pm
v3
Comments
Keith Barrow 5-Feb-12 4:24am    
I've formatted your code for you, you should do this when posting a question. To do this, highlight the code block, and click the "Code" button.
maliheSadat 6-Feb-12 3:42am    
thanx

1 solution

http://jsfiddle.net/juLg9/3/[^] is a good running example that should give you some idea.
 
Share this answer
 
Comments
maliheSadat 6-Feb-12 3:41am    
thanx for ur answer
it works well in jsfifflw.net.but when i copy it in visual studio it doesnt work!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900