I am trying to add certain styles to the page based on the current page width. I want this to function live. For example, when viewing on a iPhone and rotating the screen while viewing an already loaded page, the css will change. Also, I would ideally like to use the mobile jquery library. Thanks in advance for the help. Here is what I have so far which doesn't seem to work, I tried using LiveQuery also and that didn't work either
$(function() {
$(document).live('css_init', function() {
if (($(window).width()) > 430) {
$('#main_panels .next').addClass("next-wide");
$('#main_panels .prev').addClass("prev-wide");
};
});
$(document).trigger('css_init');
});