This is not true:
$('a:lang(en)').attr('display', 'inherit'); $('a:lang(it)').attr('display', 'none');
There is no "display" attribute, use: instead
$('a:lang(en)').css('display', 'inherit'); $('a:lang(it)').css('display', 'none');
Or simply:
$('a:lang(en)').show(); $('a:lang(it)').hide();
... but you also have an error here where you did not put your function correctly:
$("#en").click(function(){ $('a:lang(en)').css('display', 'inherit'); $('a:lang(it)').css('display', 'none'); };
It should be: });
$("#en").click(function(){ $('a:lang(en)').css('display', 'inherit'); $('a:lang(it)').css('display', 'none'); });
Also, I would use inline , not inherit . "inherit" does not mean "default", it means "inherit this property from the parent", which is likely to be block . <a> displays inline by default.
Wesley murch
source share