Anchor Point - Click Link To Jump To Another Page?

Jun 17, 2011

When you click a link it jumps to an anchor point on the page and scrolls there smoothly. I was wondering how I get the same effect if I want the link to jump to another page? A normal anchor point on another page would set the href to, for instance, 'index.html#contact' but it won't work in this case as the javascript isn't reading the '#'.
<script type="text/javascript" src="jquery.js"></script>
<script>
function goToByScroll(id){
$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');
}
</script>
</head>
<body>
<ul>
<li><a href="javascript:void(0)" onClick="goToByScroll('contact')">Go to anchor 1</a></li>
</ul>

View 13 Replies


ADVERTISEMENT

JQuery :: Jump To Anchor Tag On Page Load?

Jan 27, 2011

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?

$(document).ready(function(){
$a[href*=#]").click(function(e){
$

[code]....

View 2 Replies View Related

Make The Focus Jump To The Next Element (anchor) In A Page?

Jun 4, 2009

vBulletin uses a template system so I can't create a separate element for everything -- we have had several people ask for a "skip to the next post" feature and I'd like to implement that for them My first thought was to use anchor tags such as:

<a name="$post[postid]">

for each post and then to create a link for "Jump to Next Post" which would advance the user to the next instance of <a name="$post[postid]"> in which the postid obviously would've changed. With that I didn't know if there was a way that I could have javascript look for the next instance of this, or to pull the postid number and add 1 to it to find the next post on the page. I'm also not sure if it would need to be as complicated as reading where it was at and then adding one and directing person to that anchor point, which is why I thought maybe it could just look for the next instance of <a name="$post[postid]"> and refocus the screen on that.

It doesn't have to be an anchor, it can be a hidden input, whatever makes the JS be able to seek it as a point to move the page to. We do have some members that select a different number of posts per page than the default, so I'm guessing that the plus one might not be a great idea if they used a smaller number per page and then clicked the last one, whereas people with more per post wouldn't need to stop at the same point before it no longer let them. If there's a solution for that, that'd be great as well (such as once it hits the last element on the page, it no longer receives instruction, goes to the top of the page, or something).

View 2 Replies View Related

Stop Jump To Anchor Links On Page Refresh?

Jun 22, 2010

I've used the ScrollTo plugin for header images for each topic and I have created a menu to change the content in the div(s) that contain readable content with ajax, so it looks like different pages with headers using the one page.

everything works well, but on browser refresh the page jumps down after the menu and on to the header.

Would anyone know a script that would deactivate all anchor links in the page so that page onload the page loads as default index.html instead of index.html#some_anchor

View 7 Replies View Related

Universal To Get Anchor Param In The Url And Jump To That Spot On The Page

Aug 14, 2009

using js to force a specific anchor call to jump after the page completely loads. The reason I am doing this is because the page I am linking to with anchors takes a long time to load and a standard browser anchor link sometimes does not work 100%. With that said, I would now like to make the script I wrote universal to get ANY anchor param in the url and jump to that spot on the page. Right now it's coded to just look for "#anchor". I want to re-code it so it will look for "#" + "anyAnchorName".

[Code].....

View 1 Replies View Related

Script-Added Anchor Preventing Jump Of Doc-Coded Anchor?

Jan 9, 2010

I have a script that scans an HTML document for headers and special comment tags for the purpose of generating a left-floating/position-fixed DIV that contains the document's outline or "table of contents." Within the DIV are lists (UL element by default) whose items (LI elements) are jump-to links (A elements) to the points (headers, special points marked for inclusion in table of contents) in the document. The problem is this. I have typical HTML document with links that jump to points (usually headers) inside the document, as shown below:

Code:

<body>
<p>This is addressed <a href="#later-text">later</a> in this document
<h1><a id="later-text"></a>Header Text</h1>
<p>...
</body>

But my script, being a document outliner that finds headers in a document, inserts another anchor as a jump-to point just before the first occurrence of text in the header (inserted A element shown in red below). This somehow disables the document-coded jump anchor (shown in blue below). And it occurs in FF and IE, which suggests it is not a browser-specific issue. Why does it occur? Is there something in the HTML spec that states that two anchors to which a jump occurs are not allowed to be adjacent elements in the document?

Code:

<body>
<p>This is addressed <a href="#later-text">later</a> in this document
<h1><a id="later-text"></a><a id="jump-1"></a>Header Text</h1>

[code]....

To reproduce what I am seeing, search for the text "Why Is A Survey Done". The first occurrence is a within-document jump-to link, which should jump to a header below it. If the script execution to generate a document outline is disabled, the jump works. But if the script is executed and the document outline generated, the jump-to link does not work.

View 2 Replies View Related

JQuery :: Reload Page With Anchor When Anchor Link Is Clicked?

May 26, 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:

$('a.reload').click(function() {
window.location.reload();
});

View 4 Replies View Related

Call The Click Event Of The Link (anchor Tag) On The Click Of The Button?

Jan 24, 2011

I want to call the click event of the link (anchor tag) on the click of the button. I used this code below in the click event of button to call links click event and it works fine in IE.

document.getElementById('linktag').click();

But, this doesn't work in Firefox. I googled a bit and found that in firefox, you have to do something more to achieve this behaviour. So, I ended up doing this on button click to work in firefox:

var link=document.getElementById('linktag');
var e = document.createEvent('MouseEvents');
e.initEvent(

[code]....

The above code does the click on link when I click on the button. But my problem now is that I have defined a link as

<a href="mailto:abc@xyz.com?subject=abc&body=email body">email </a>

and when click is called and mailto links opens my email client, it somehow ignores the subject and body parameters of the link. It works properly when i actually click a link element. but it doesn't work when i simulate the click event by code written above. above dispatching event code somehow ignores the link parameters?

View 3 Replies View Related

Save Link Of Dynamically Created Anchor On Click?

Jul 21, 2011

I am trying to save a dynamically created anchor's id onclick, but I am having a lot of trouble.code...

View 3 Replies View Related

Jump To Anchor Tag Onload?

Aug 11, 2009

I currently have a script to jump to an anchor tag when the page loads:

<script type="text/javascript">
function goToAnchor() {
location.href = "myPage.html#myAnchor";
}
</script>

Now, I would like to take it a step further and would like to link from page A to page B that usually takes a while to load and once the page loads, run a script to jump to the specified anchor tag on the page after everything has loaded. I know I have to add some parameters at the end of the url link on page A, but that's where I get stuck.

View 6 Replies View Related

Change Link Anchor Text On Load But Restore On Click

Jan 15, 2011

Lets say I have a bunch of links with the same class but different anchor text like [code] When the page loads I want the anchor text of each link to display the same text of my choosing. However, when the visitor clicks a link the anchor changes back to the orignial. It would be best if all links could be changed back their original if any link is clicked but this isn't necessary.

View 1 Replies View Related

JQuery :: Hidden IFrame Does Not Jump To Anchor In FF?

Sep 28, 2010

I have a hidden iFrame (display:none) which I change the src attribute of to load new contents. When the iFrame has finished loading I make it visible again (display:inline). This works fine except for anchors. The iFrame will not jump to an anchor when finished loading if its hidden in FF.

View 2 Replies View Related

JQuery :: Preventing Anchor Jump To #test1 Automatically?

Mar 26, 2010

You know how when you visit [URL] your browser jumps to #test1 automatically? Not talking about when you open page.html and THEN click an anchor to #test1. I mean typing the anchor explicitly at the end of the url before even visiting page.html. How do you prevent that jump? Just a sample scenario, to make sure I'm being extra clear:

[Code]./..

View 2 Replies View Related

JQuery :: Target A "Cycle #anchor" From An External Page Link?

Sep 3, 2010

I have Cycle "pager" navigation working flawlessly in one of my pages. What i'm trying to do is this:

I'm Attempting to LINK to specific Anchors from a link on a different page.

Example:
// external page link //
<a href="http://www.convertstyle.com/beta/apparel/womens-apparel#shirt1">Headline Womens</a>

[Code]....

View 1 Replies View Related

Go To Next Page - Load The First Page Of A Series Of Pages Into An Iframe When You Click A Link

Aug 15, 2006

1. Load the first page of a series of pages into an iframe when you click a link
2. On each click load the next in order page
3. When last page has loaded if clicked again will start from the beginning.

What I am doing: I am creating a tutorial for a friend who cannot figure out how to use her new rental management program. I could use a manual slide show to have her click for the next image however, there are a LOT of tutorial images which show her what to do at that point. Her program contains a great number of setup screens, report screens etc. This means the slide show would be sitting there loading all these images before it will work. So, I figured, OK make a page with an iframe, and then I could put each image on it's own little page i.e. page1, page2 etc. Place a little button, or a next link, then have the link load the pages into the iframe in order.

View 5 Replies View Related

JQuery :: Select Next Class From The Point Of Click?

Sep 19, 2010

in FCK-Editor I would like to do the following:On one page there should be severalHeaderText under the header, which is hidden, when the text is loaded and slides up and down after click on headerHtml, which is easy to edit with FCK could look like this:

<p><a href=""><span class="click">Header</span></a></p>
<p><span class="text">Text under the header, which is hidden, when the text is loaded.</span></p>

[code]....

View 7 Replies View Related

Click An Image, Scroll To A Certain Point -- Mootools

Feb 17, 2010

I am trying to make one small modification to a website. I just want to make an image that, when clicked, scrolls to a certain point.

This is the javascript that I think controls the scrolling:

var element_y;
var swiffy;
var cur_groupid;

[Code]....

View 6 Replies View Related

Find Nearest Coordinates Click Point?

Mar 4, 2009

How to find the nearest coordinates click point on images? For example, if the user click on point on coordinates(10,20) ; then after that if the user wan find the nearest coordinates of (10,20). Let say the nearest coordinates is between (9,19), (11,21).

How find that point? If i wan fixed to 20x20 pixel for the click point, how to do?

View 6 Replies View Related

Make Webpage Jump To Top When Link Inside Iframe Is Clicked?

Apr 6, 2007

My website uses a very tall iframe to display catalog pages from an external website. I'm using iframes here to make it look like the external catalog pages are on my webpages.

The problem is that when a visitor goes to my page, scrolls down to view all the contents inside the iframe, and then clicks a link inside the bottom of the iframe to goto the next page, that next catalog page will load inside the iframe, but the visitor will still be looking at the bottom of the iframe on my website, and thus has to scroll up to the top of my website to see the top of the iframe's contents.

To see exactly what I mean, go here, scroll down, and click the next page link: [URL]

How can I make it so when someone clicks a link inside the iframe, that the page with the iframe automatically scrolls to the top appearing as if the whole website has refreshed?

View 5 Replies View Related

JQuery :: Point And Click Style Walkthrough And Interactivty Using Static Images?

Mar 14, 2011

I understand that the very essence of the web is point and click however what I'm trying to achieve is anavigationsystem using a series of static 3D Render images have them seamlessly stitch together creating apseudowalk througheffect. For example if a user clicks on a hot spot e.g. a drawer it will fetch the same image but with the drawer open. or if a user wishes to go 'deeper into the scene e.g. a walk-through style effect then they would click on the hotspot and the image presently loaded would zoom out and and fade out loading the next thus giving you forward motion

mentally speakingIunderstand this to be perfectly simple to do technically speaking not so much this at the moment is acompletelyconceptual idea with no coding as I'm still attempting to get my bearings with jquery i was curious to what peoples thoughts were on the idea whether or not it is possible to do?

View 2 Replies View Related

JQuery :: Page Goes Up When Click The Link?

Sep 8, 2009

I am using jQuery BlockUI Plugin (v2). It works success but I have a small problem, when I click the link, it is bloclking the page but the main page goes up. Also same problem for link which is oppening new tab or new windows. main pages goes up when I click the link.

View 5 Replies View Related

Script To Add To Url To Click Link On Page?

Jun 3, 2009

I am actually working on a Phpbb forum for members of an online game I play. I am trying to make custom BBcode tags to access things in my game with no success! Here is the thing. In this game, there are players and tribes (groups of players). I am unable to link to the player/tribe pages directly with a url using the names because the database and pages for them are linked by numbers. ie: each player/tribe name corresponds to a database entry number and you can only use numbers in the URL.

[Code]...

View 6 Replies View Related

Click Link Add To Reveil Page?

Dec 29, 2010

I have been looking for a script like the following.[URL].. Where a visitor must click each link before accessing the website.

View 2 Replies View Related

Run On Page Load And Not Click Link?

Jan 18, 2011

I'm setting up a video gallery on a site. What I want to happen is that when the user clicks on a thumbnail it then opens and plays the corresponding video clip in shadowbox.

What shadowbox opens is a page which holds the video player object. What I need to happen is for the video reference to be passed to the page that shadowbox opens.

I don't know how to do this. I can get this working where the thumbnails are all on the same page as the video player object. The link on the thumbnail images is as follows:

<a href="javascript:loadVideo('rb6RuHSMY-8');"><img src="data/thumbnails/01.jpg" width="118" height="66" alt="video" /></a>

What I was trying to set up was to get the page that shadowbox opens to automatically run the loadVideo javascript with the reference variable passed to it in the url.

View 1 Replies View Related

JQuery :: Click Link Do Animation Then Go To Next Page?

Dec 10, 2009

i have a link the jquery code says when my link is clicked do this animation the problem is that when you click on the link it skips the animation and jumps to the next page. is there a way to make the animation run and when finished then go to the link page that the link anchors to?

click link animate then go to page

$(function() {
$('a').click(function(){
$('#yummy').animate({height: 200, width: 200}, 3000) });
});

View 1 Replies View Related

JQuery :: On Link Click Fadeout A Div Before Redirecting The Page?

May 3, 2011

Is it possible to make jquery fadeout a div before the page redirects to the links href?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved