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
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
HTML Pages with CSS and JavaScript
Problem Executing example of Jquery for Dummies
Sunni srivastav
Greenhorn
Posts: 24
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am reading jquery for dummies,and was trying to execute first example of the book:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”> <html> <head> <title>My Test Page</title> <script type="text/javascript" src="js/jquery-1.7.2.js"> $(document).ready(function(){ alert(jQuery(‘img’).attr(‘alt’)); }); </script> </head> <body> <p>This is my test page.</p> <img src= "images/home.gif" height="28" width="28" alt="This is a test image."> </body> </html>
But the alert box does not pop up when I load this page.Image appears on the page but not the dialog box...I don't know what am i doing wrong.
Sunni srivastav
Greenhorn
Posts: 24
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
found the mistake....
<script type="text/javascript" src="js/jquery-1.7.2.js"> $(document).ready(function(){ alert(jQuery(‘img’).attr(‘alt’)); }); </script>
should be replaced by
<script type="text/javascript" src="js/jquery-1.7.2.js"> </script> <script type="text/javascript"> $(document).ready(function(){ alert($(‘img’).attr(‘alt’)); }); </script>
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
jquery, hover and unbind
rich:hotKey worked when using jQuery?
Having Problems with Jquery.
JSPF file can not be included in JSP file and gives error
More...