MediaWiki:Mobile.js

From OpenStreetMap Wiki
Jump to: navigation, search
/* Any JavaScript here will be loaded for users using the mobile site */

// adds expansion link for language bars
$(document).ready(function() {
    $('#ExpandLanguages a:first-child').click(function(event) {
        event.preventDefault();
        $('#Languages').toggleClass('showOther');
        // The text of the link might need to change as well
    });
});

// code from joto to produce taglist tables, doing calls to get data from taginfo
// Used for creating lists of tags from taginfo.
// See https://wiki.openstreetmap.org/wiki/Taginfo/Taglists
jQuery.getScript( "https://taginfo.openstreetmap.org/js/taglists.js", function() {
  $(document).ready(function() {
    taginfo_taglist.convert_to_taglist('.taglist');
  });
});