Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i wrote code in javascript and i defined it in the default page as usual by <script> tag. and i defined an accordion function below the script tag and i also, include the jQuery1.6.2 & jQuery 1.2.6 but my project is not running mentioning the errors as follows,

1.object expected
2.selector is undefined

can anyone tell me how to use jquery accordion control in website application?
Posted
Updated 12-Dec-11 23:47pm
v2
Comments
thatraja 13-Dec-11 5:51am    
Show your code
riodejenris 13-Dec-11 5:59am    
source of the default page:

<script type="text/javascript" src="JScript.js"></script>
<script language="javascript" type="text/javascript">
$( selector ).accordion();
</script>

attributes defined in the design view of default page written in source:
<ul>
<li>INDIA
<ul>
<li>Tamil Nadu
<div>
Information about Tamil Nadu</div>
</li>
<li>Kerala
<div>
Information about Kerala</div>
</li>
</ul>
</li>
<li>SAUDI ARABIA
<div>
Information about SAUDI ARABIA</div>
</li>
</ul>




java script file
$('#one').liteAccordion({
onTriggerSlide : function() {
this.find('figcaption').fadeOut();
},
onSlideAnimComplete : function() {
this.find('figcaption').fadeIn();
},
autoPlay : true,
pauseOnHover : true,
theme : 'stitch',
rounded : true,

}).find('figcaption:first').show();

$('#yourdiv').liteAccordion({
theme : 'dark',
rounded : true,
firstSlide : 2,
linkable : true,
easing: 'easeInOutQuart'
});

$('#yourdiv').liteAccordion({
theme : 'light',
firstSlide : 3,
easing: 'easeOutBounce',
activateOn: 'mouseover'
});

1 solution

do you have use this line
XML
<script type="text/javascript" src="Script/jquery-1.4.1.js">
 </script>


and then use

XML
<script type="text/javascript">
       $(function () {
           $("#Button6").click(function (evt) {
              evt.preventDefault();
               $('#Panel1').slideToggle('slow');

         });
       });
               </script>



See these links slidetoggle of Jquery.
see example
accordion-with-jquery
 
Share this answer
 

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