[jQuery] jQuery Slider and Spinning Picture + Complication
I have this code here and I was wondering how I might go about making
a little gif spin around while it is doing it's thing.
On a more complicated note, is there any easier way I can do this? I
have a page that displays 16 houses and relevant information. It also
displays a Google Map with all of the markers to houses on it. Right
now I have it doing load and loading into 2 separate divs. I don't
this this is the best way to do it. I am using Django and all of my
data comes from querysets (like a dictionary).
My ideal situation would be to initially load the data through ajax
and update through ajax. But I cannot find an easy way to do this. If
I searialize the data, I don't see an easy way to deserialize it. I
was also looking at a js template language. I could feed out the
querysets to the js template but they look complicated and may not
work the way I want them to. If anyone has an idea or some reading
they could point me to, that would be great.
$("#slider-range").slider({
range: true,
min: 130000,
max: 695000,
step: 5000,
values: [130000, 695000],
slide: function(event, ui) {
$("#amount").val('$' + ui.values[0] + ' - $' + ui.values[1]);
},
stop: function(event, ui) {
$("#results").load("/models/results/" + '?minimum=' + $("#slider-
range").slider("values", 0) + '&maximum=' + $("#slider-range").slider
("values", 1));
$("#map").load("/models/map/" + '?minimum=' + $("#slider-
range").slider("values", 0) + '&maximum=' + $("#slider-range").slider
("values", 1));
}
});
$("#amount").val('$' + $("#slider-range").slider("values", 0) + ' -
$' + $("#slider-range").slider("values", 1));
});