Hello All,
I have a question
I have a tool, that resizes texts on a page for accessibility
You can see an example here http://bit.ly/1mSN26K
in the header there are three A that resize the text when clicked
When i click to have bigger text, it works fine.
But then when i click on a menu item for example, the page loads in normal state, then switches to big text state, which makes a resize after load visual effect.
It feels like the page is loaded, the cookie read, then the page is resized.
Does anyone know how i could manage so that the page is loaded directly at the good state.
i have this script.js that is loaded via my theme.info
it contains
// Text Resizer - Permet de redimensionner le texte
if($.cookie('TEXT_SIZE')) {
$('html').addClass($.cookie('TEXT_SIZE'));
}
$('.resizer a').click(function() {
var textSize = $(this).parent().attr('class');
$('html').removeClass('small medium large').addClass(textSize);
$.cookie('TEXT_SIZE',textSize, { path: '/', expires: 10000 });
return false;
});
// CONTRAST
$('.contrast a').click(function() {
var textSize = $(this).parent().attr('class');
$('html').removeClass('neutre accentue').addClass(textSize);
$.cookie('TEXT_SIZE',textSize, { path: '/', expires: 10000 });
return false;
});
Thank you for your help