mercoledì 16 settembre 2015

UI - accordion widget / alcune cose

1) creare custom icon:

jQuery("#accordion").accordion({
    heightStyle: "content",
    collapsible: true,
    icons: {
        "header": "ui-icon-custom",
        "activeHeader": "ui-icon-custom2"
    }
});

header indica l'header chiuso e l'activeHeader l'header aperto.

con i css si crea:

.ui-icon-custom {
    background-image: url(img/accordiondown.png) !important;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
 }
.ui-icon-custom2 {
    background-image: url(img/accordionup.png) !important;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}


Nessun commento: