I've got a label in view with the ID filterOff and this jquery:
$(document).ready(function () {
$('#filterOn').click(function () {
$('#filters').hide();
$(this).attr('id', 'filterOff');
});
});
$(document).ready(function () {
$('#filterOff').click(function () {
$('#filters').show();
$(this).attr('id', 'filterOn');
});
});
It works on the first instance either way around though doesn't work for the 2nd click. I can't work out what's wrong with it? The ID is changing i've checked select element in developer view, though it doesn't work.