Customize Term-Legend
-
Hi Dylan and other Geomashup-users,
I have been trying to customize the term-legend. I have successfully changed the layout with the help of the tab-style-sample. Also I made the checkboxes disappear {visibility:hidden;}, so only the label will function as “click”object. All functioning well.
Now what I would like to do is change the label color (f.e. greyed-out) to make it clear when a label is checked or not.This DEMO shows it could work.
I understand that I have to put this code with adjustments into the custom.js file(and have the plugin activated). I just don’t seem to get it right. I have tried several variations like:
(function($) {
GeoMashup.addAction( ‘taxonomyLegend’, function($legend, taxonomy ) {
$(‘.gm-legend.category’).on(‘change’, ‘input:checkbox’, function() {
$(this).parent().toggleClass(“green”); })
})
});-with/without function
-several changes and replacing of the ul-class or li, and more like:
$(“input:checkbox”).click(function(){
$(“li”).toggleClass(“green”);
});Hope you or someone can help me out?
Thanks
- The topic ‘Customize Term-Legend’ is closed to new replies.