JQuery Toggle Button Trigger
Posted
by Ozzy
on Stack Overflow
See other posts from Stack Overflow
or by Ozzy
Published on 2010-03-17T21:20:18Z
Indexed on
2010/03/17
21:21 UTC
Read the original article
Hit count: 452
Hi all, i have this code:
$('.access a').toggle(function() {
$('link').attr('href', 'styles/accessstyles.css');
$('body').css('font-size', '16px');
}, function() {
$('link').attr('href', 'styles/styles.css');
$('body').css('font-size', text_sizes[text_current_size] + 'px');
});
It works fine. But how would i programmatically trigger the toggle instead of clicking on it?
© Stack Overflow or respective owner