• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JQuery not working

 
sumanth makkapati
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"?
     
    sumanth makkapati
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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
    Posts: 15302
    6
    Chrome IntelliJ IDE Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    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?
     
    sumanth makkapati
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    yeah I forgot to mention, I've excluded the anchor tag from the div

    Thank you
     
    Gregg Bolinger
    GenRocket Founder
    Ranch Hand
    Posts: 15302
    6
    Chrome IntelliJ IDE Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    sumanth makkapati wrote:yeah I forgot to mention, I've excluded the anchor tag from the div

    Thank you



     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic