Jquery implementation accordion effect example code

  • 2020-03-29 23:45:53
  • OfStack

//Jquery realizes accordion effect & NBSP;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
<title> The accordion </title>  

<script type="text/javascript" language="javascript" src="jquery-1.7.1.min.js">  
<script type="text/javascript" language="javascript" src="jquery-ui-1.8.18.custom.min.js">  
<link rel="stylesheet" href="ui-lightness/jquery-ui-1.8.18.custom.css"/>  
<script type="text/javascript" language="javascript">  
        header: "h3",  

        axis:"Y"//Drag effect & NBSP; Drag up and down & NBSP; By default drag left and right & NBSP;
<div id="accordion" style="width:600px; height:600px; border:1px #F00 solid">  
      <h3><a href="#">first</a></h3>  
      <div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>  
   <h3><a href="#">second</a></h3>  
   <div>Phasellus mattis tincidunt nibh.</div>  
   <h3><a href="#">third</a></h3>  
   <div> The long </div>  

Related articles: