Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
HTML Pages with CSS and JavaScript
Scroll Event not being fired using jQuery
Vishal Hegde
Ranch Hand
Posts: 1087
I like...
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Dear Team,
Scroll event is not being fired. I used the alert also inside the scroll event, but the alert itself is not being called.Please assist as of where I am going wrong.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <link rel="stylesheet" type="text/css" href="scroll.css"> <script src="jquery-1.8.2.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() {alert("outside scroll"); $('#news').scroll(function() { $('#header').append('<span class="scrolled">You scrolled!</span>'); alert("Inside scroll"); }); }); </script> </HEAD> <BODY> <div id="news" class="scrolled"> <h1 id="header">hii</h1></div> </BODY> </HTML>
http://www.lifesbizzare.blogspot.com
|| OCJP:81%
Eric Pascarello
author
Posts: 15385
6
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
works for me:
http://jsfiddle.net/srePP/
Are you scrolling the page and not the element you attached it to?
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
a jquery plugin (not THE struts2-jquery plugin) not being loaded with struts2 mvc framework
change event is firing twice
Directory Structure JSP & JS
validation messages not displaying the error messages in the HTML boxes
How to alert a value in <td> element tag ?
More...