I am a real jquery newbee and found this script - and it works fine, but only when I touch the screen (mobile) ...
What I'm looking for is a way to activate a script automatically ... Can someone help me?
<script>
jQuery(window).resize(function(){
if ( jQuery(window).width() < 480 )
{
jQuery('.mid_grid_right').insertBefore('.mid_grid_left');
}
if ( jQuery(window).width() > 480 )
{
jQuery('.mid_grid_left').insertBefore('.mid_grid_right');
}
jQuery(window).height();
jQuery(window).width();
});
</script>
HBank source
share