Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Accordion widget - remove the icon and padding

Tags:

I'm new to jquery and i'm trying to find out if it's possible to create simple accordion without the arrow icon and without padding at all inside the accordion content.

I want to use the whole content space, and it seems like jquery accordion widget auto create some padding as the width of the arrow icon.

Thanks! Lior

like image 277
liorix Avatar asked Jul 03 '10 19:07

liorix


2 Answers

to remove the icons you better use

$( "#accordion" ).accordion({     icons: false }); 
like image 100
Renato Gama Avatar answered Dec 04 '22 21:12

Renato Gama


All you need to do is add your own CSS to remove the icon and padding, or override the default CSS with something like this:

#accordion .ui-icon { display: none; } #accordion .ui-accordion-header a { padding-left: 0; } 

if accordion was the ID you where you called the function (see the demo)

Oh and if you want to remove the content padding, use this CSS:

#accordion .ui-accordion-content { padding: 0; } 
like image 31
Mottie Avatar answered Dec 04 '22 21:12

Mottie