Hello, I know in JavaScript you are able to write functions that you can just call at a later time. I'm working on a jQuery UI slider, and I wrote a function for the animation that happens when you start sliding. I would also like this same function to fire for the "change" event, but I can't seem to get it to work.
Here is the shortened code sample:
$(function(){
var posterO = $(".poster-slider")
.slider({
slide: function(event, ui){ //This is the function I would like to reuse at "change", below
poster.css(...);
posterLi.css( ... );
ptCopy.css( ... );
sliderValue = ui.value;
},
//change:,
animate:true
});
//When "#abundant-trees" link is clicked, the slider handle changes, firing the "change" event, but the "slide" function is not called.
I am having a problem with a function I am trying to write. I can't change the CSS on the second list item because it's telling me that "css is not a function."
I am trying to make it so that when you hover over one of the list item points, it will show the copy related to that item in a separate box.
Hello, I'm building my first jQuery Mobile website and I wanted to know what the advantages and disadvantages of the two page methods were.
As far as I can tell, it comes down to page weight vs. server requests.
A single page is going to be super-heavy as it has to load all site content at one time, but would potentially be more responsive after that initial hit.
Multiple pages will be more lightweight initially, but will then cause several additional hits to the server as the AJAX preloads potential pages the user may click. It may also be less responsive if the next page has yet to load.