I have two different sized images, one if for screens smaller than 759px, the other is for screens larger than 759px.
I have managed to get the source of the images
Your code works fine, as I can see, but I prefer to use setTimeout, some times page could slow down without resize pause.
$(document).ready(function() {
var resizeTimer,
$window = $(window);
function imageresize()
{
if ($window.width() < 700)
{
$('.fluidimage').text('< 700');
}
else
{
$('.fluidimage').text('>= 700');
}
}
imageresize();//Triggers when document first loads
$window.resize(function() {
clearTimeout(resizeTimer);
resizeTimer = setTimeout(imageresize, 100);
});
});
Example: jsfiddle.net/SAbsG/