but i do not change hash tags, and i dont do clicking.
an interval function is fading elements in and out. like a slider, but automated (displaying catchphrases).
everytime one interval is over, the viewport centers the faded div. so if you are down the page reading other stuff, it zaps you back up to watch the "oh so awesome"-animation.
is this a known issue? i would like the viewport to just ignore whats happening on top of the page.
i have been coding on this vertical sliding navigation quite a while. its tested on all relevant browsers and works like a dream.
id loved to show you an example of it, but the site is under development, and i, as a little coder, am not allowed to grant access to it, additionally i do not have enough time to create a testcase for everybody to see.
to give you a short insight:
the site is quite long (vertically) and we wanted a small navigation (very subtle) to follow the user when scrolling. the problem was: the footer is quite long too, and we didnt want the sliding navigation to reach into it, when scrolling down the footer. in other words: i had to stop the animation when the sliding nav reached the end of the main content.
so far so good, i had NO idea how to tell the animation to stop at certain conditions, other than telling it that from the start.
my solution is totally workaround and completely selfmade. but i am SURE that there is some kind of "stop animation when condition is met"-command i was totally overlooking. so please dear jquery community: tell me what i am doing wrong, and how i could improve this function.
here is the code:
function slide_nav() {
var scrollingDiv = jQuery("div#slide_nav");
if(scrollingDiv.length > 0)
{
// check for main div lower border to set the navigation so, that it
// doesnt exceeds this value when scrolling
// save the main divs lower border position from top
var main_div = jQuery('div#main');
var main_div_position = main_div.position();
var main_div_lower_reach = main_div_position.top + main_div.height();
var scrollingDiv_offset = scrollingDiv.offset();
var initial_offset = scrollingDiv_offset.top;
// Create small helper dog to look up position when finished animating
upgrading from 1.0_a2 to 1.0a4 got me some styling problems. For example: the icon of the "ui-btn-left" sits too far on the left, reaching out of the button and getting cut off.
I just wanted to ask if this is a known bug, if there is a fix, or if somebody else expierienced this.
I have a logo in the data-role="header" section which is also a link to home. jquery mobile processes this link and puts its elements around it (span tags and stuff), for it to match other links on the page (rounded border, etc..).
It would be great if I could tell jquery to keep this single link unprocessed and style it myself through overriding the theme styles. Is there a way to do this, or maybe different solutions for my problem?
in short: can i keep jquery mobile from processing specific elements like links, to get rid of the span tags (in that case)?
Hi jquery-jedis! I have an AJAX function success running and want to prepend some html-comments to selected elements. If i alert(); the variable, its perfectly set up. Only it wont prepend(); to the element (or any other like jQuery('body')) as I want it to.
I would really appreciate if someone could give me a hint here... Here is the code:
Im appologizing in advance if its some stupid beginners mistake I could've found on my own through reading documentation. It's just... I'm stuck for a couple of days now and can't figure it out :(