im currently learning jQuery and have ran into a problem. I am trying to use the liteAccordion library (found here: http://nicolahibbert.com/demo/liteAccordion/)
i want to have a button to hide the “accordion” but since it has autoPlay, i get a bunch of error. I was wondering how i can temporarily turn off the autoPlay.
ie: how can i modify the autoPlay value of the object. The object is created as follows:
$('#mainNavigation').liteAccordion({
onActivate : function() {
this.find('figcaption').fadeOut();
},
slideCallback : function() {
this.find('figcaption').fadeIn();
},
autoPlay : true,
pauseOnHover : true,
theme : 'colorful',
rounded : true
})
Try referencing the main div, which lite accordion uses;using jquery hide
for example: you can use
$(‘#one’).hide() to hide the div on lite accordion page.
http://nicolahibbert.com/demo/liteAccordion/ (the div which is the main container for accordion ,has an id =”one”)
or refer the accordion while you create, using a variable
myAccordion = $('#two').liteAccordion();now use jquery functions on the variable
$(myAccordion).hide();etc