Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Move this topic
Forum :
Getting Started
Using jQuery
Using jQuery Plugins
Using jQuery UI
Developing jQuery Core
Developing jQuery Plugins
Developing jQuery UI
QUnit and Testing
About the jQuery Forum
jQuery Conferences
jQuery Mobile
Developing jQuery Mobile
Sub forum :
Move this topic
Cancel
Using jQuery
denis_ogr
How to make pause after $('document').ready ?
in
Using jQuery
•
11 years ago
Hello,
I need after upload html page, make pause and scroll to anchor.
HTML
TextText
TextText
TextText
<span id="anchor1">anchor1</span>
TextText
TextText
TextText
Jquery
<script type="text/javascript">
$(document).ready(function() {
elementClick = 'anchor1';
$('body').delay(3000);
destination = $(elementClick).offset().top;
if($.browser.safari){
$('body').delay(3000).animate( { scrollTop: destination }, 1100 );
}else{
$('html').delay(1000).animate( { scrollTop: destination }, 1100 );
}
});
</script>
Its not work. No pause. No animate scroll.
Help.
Denis Porplenko
1
Replies(2)
charlietfl
Re: How to make pause after $('document').ready ?
11 years ago
elementClick is not a valid jQuery selector
try
elementClick = '#anchor1';
EDIT: I don't think delay will do anything since you have nothing in animation queue, would be better to use setTimeout
denis_ogr
Re: Re: How to make pause after $('document').ready ?
11 years ago
Thanks,
elementClick = 'anchor1'; change
elementClick = '#anchor1';
-
it is misspelled.
You help me, Thanks!
setTimeout-help.
<script type="text/javascript">
$(document).ready(function() {
setTimeout(function() {
elementClick = '<?=$_GET['anchor']?>';
destination = $(elementClick).offset().top;
if($.browser.safari){
$('body').animate( { scrollTop: destination }, 1100 );
}else{
$('html').animate( { scrollTop: destination }, 1100 );
}
}, 100);
});
</script>
Leave a comment on charlietfl's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to denis_ogr's question
Top
Reply
{"z7340726":[14737000002608006,14737000002608437],"z1411412":[14737000002608088]}
Statistics
2
Replies
3192
Views
0
Followers
Tags
Cancel
body
scroll
delay
Actions
Permalink