JQuery :: Reload A Page And Scroll To Anchor In Another Div?
Mar 29, 2011
I need to get the page to reload with the anchor in the link when it is clicked in a dropdown menu. For example if I am on 'www.domain.com/about/#2' and I then click on 'www.domain.com/about/#3' the url changes but the page doesn't reload so I need the page to reload, but keep the new anchor (#3).I gave the links with anchors a class of 'reload' and tried this:
I have got tabs working great and have set up a rotate every 5 seconds but whenever it loads a new tab (either by clicking a link or rotating to it) it moves up to the top of the page as if it was following an anchor.
i have a div of height 500px and width 800px. i have set it as auto on over flow and usually i have 500 records displayed so it scrolls. lets say i trigger an even on row number 478 inside that scrollable div and that event causes a page reload, can i go back to that same position in side that div? how?
I have tried to use window.location.reload with window.location.hash. It works in Firefox, but not in IE. I have been trying something like that: <input type="button" value="Click to refresh" style="width: 130px" onclick="window.location.hash='#something';window.location.reload()" /> As I said, this works with Firefox, but not with IE9 Also, I can't define urls beforehand because I want other people to be able to use it to their own blog or website.
Adapting this code may not be the best method, see what you think.
I have a page where certain actions cause the page to reload and then jumps to an anchor (e.g. #title gets appended to the url) which is disorientating, I think it will soften the blow if the page scrolls to the anchor.
This is code I use to scroll to anchors with links on a page code...
I see that this is a click function. Can this just be amended so that it checks the url and scrolls accordingly?
Code: <a name="loc"></a> <a href="#loc" onClick="document.location.href='#loc' document.location.reload(false);return false">Click here to go to your location</a>
When you click onto the link you should go to the page location marked by the anchor tag "loc", however, upon clicking you go to the top of the page and never redirected to the exact spot where your anchor tag is located. Why is that? I'm using IE6 (per requirement) as my platform.
I'm using a JQuery function to slide a div into and out of visibility, but every time I toggle, the browser resets my view to the top of the web page..What I want to happen is when you click to reveal the div, the page scrolls down and the div content is in full view. When I click again to re-hide the div, I want the page to scroll back up smoothly instead of just reverting to the top of the whole page...The page url is: http:[url]....Here's my code:
I need to do multi DOM manipulation into a page without reload it (something like: when i click on a thum in another part load a photo with a specific text, if i click on this text load another photo).
I use a js like:
First page loading everything goes good.... but when i fall into MY_CODE1, i can't execute MY_CODE2 anymore.....
I wrote below code for Collapse/Expand some sections. It is working fine. Finally If I click "Save" button and I am re-loading (refresh)page again( code in asp.net). So then sections are going default Colleapse again. I need them back to expand sections. I mean what ever user expanded should me expanded again after refresh page. How can I do that?
Have a drupal site and jquery update1.3. seems to avoid the posiblity to jump to anchor tags. In order to this I use this script for jumping on a page. I works..But how to I manage a jump, if the href is on a different page (not external!).Something like jump on pageload to an anchor.click on page node/5/products on link href: node/5/products/xyz/#anchor1 How do I manage this?
I have an existing jquery/ajax script that does a click function. After the click function, I need to reload a div on the same page.Isnt there a simple line of jquery that would reload a div? below is the click function. lets say i want to reload a div with id="lesson" after the click.
I have the following problem: In wordpress I wanted to popup the login-page (wp-login.php) and i used the fancybox to generate an iframe. after clicking the "login" button i want that the fancybox is closing (thats not the problem) and i want to reload the whole page so that it recognizes that i'm logged in.
Now that is the problem .. I cant reload the index page when clicking the login button, because (i think so) the login document is in a iframe and is not able to reload the whole screen). I don't know the "reload" command, too, maybe load("index.php"); ? :D
I am loading a page dynamically using .load with jquery and then i have another button on that page that allows you to go back to the previous page using livequery click function. However, when I go back to the original page, none of the page functions defined previously are working anymore! Is there a way to force the browser to reinitialize the script? How does one get around this problem with jquery?
To enhance user experience on my site, I've moved a few page elements (well, the ads...) to the end of the page (in a hidden div) and when the page is loaded the content of such divs are copied to their appropriate location on the page. This makes the content load much faster and thus not delay the user.So what I did works perfectly with IE/Opera but th FireFox is causes the page to try and reload, which it never succeeds to and so we're stuck with a blank page. So yes, the problem is that there are document.write calls inside those divs which contain script but I cannot change it (google ads / ebay ads)I even tried to use setTimeout() to ensure the content is loaded (and can see that it is) but still when the move is done, the page tries to reload.
Can someone point me to method for loading random image (in container) on pageload? I have three image containers and I want to load a new image in each one at each pageload, but I want to be sure no two images are the same at the same time (if that makes sense!).