File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes JQuery not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JQuery not working " Watch "JQuery not working " New topic
Author

JQuery not working

sumanth makkapati
Greenhorn

Joined: Apr 06, 2010
Posts: 3
Hi,

I've just started learning Jquery & JSP. I just wrote my first Hello World program in JSP but the JQuery isn't responding. Please help me



Thank You
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Actually, your code is most likely working perfectly--but what's the first thing you're doing with jQuery after the page has loaded?

(Hint: $('div').hide())
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

Also a couple of things that must be mentioned:
  • <script> not <Script>
  • Modern code should not be using JSP scriptlets. Learn the modern EL.


  • Following up in David's post, how do you know it's "not working"?


    [Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
    sumanth makkapati
    Greenhorn

    Joined: Apr 06, 2010
    Posts: 3
    I'm hiding the div when the page loads and when the link is clicked the div visibility toggles.

    For some mysterious reasons the code is working than you guys for your suggestions.
    Gregg Bolinger
    GenRocket Founder
    Ranch Hand

    Joined: Jul 11, 2001
    Posts: 15300
        
        6

    sumanth makkapati wrote:I'm hiding the div when the page loads and when the link is clicked the div visibility toggles.

    For some mysterious reasons the code is working than you guys for your suggestions.


    It makes no sense that it would be working, unless you have changed your code...



    If you hide the div, it will hide the anchor. So how could you possibly click on it to unhide it?


    GenRocket - Experts at Building Test Data
    sumanth makkapati
    Greenhorn

    Joined: Apr 06, 2010
    Posts: 3
    yeah I forgot to mention, I've excluded the anchor tag from the div

    Thank you
    Gregg Bolinger
    GenRocket Founder
    Ranch Hand

    Joined: Jul 11, 2001
    Posts: 15300
        
        6

    sumanth makkapati wrote:yeah I forgot to mention, I've excluded the anchor tag from the div

    Thank you



     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: JQuery not working