Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Learning js, please explain this example using $("#h01")

    I know java and C++ and am trying to learn javascript for use in webpages. I see this example online:

    function myFunction() {
    $("#h01").html("Hello jQuery");
    }
    $(document).ready(myFunction);


    It is supposed to use a jquery library function. I don't understand the syntax in line 2. Can someone please explain $("#h01"). I don't understand the $() or "#h01".

    Thanks for any help.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,301
    Thanks
    23
    Thanked 612 Times in 611 Posts
    This is jquery, it has a close affiliation with CSS. To save a bunch of writing I'm going to have you look in a couple of places.
    The $ -> jQuery Fundamentals :: jQuery Basics
    And for selectors -> jQuery Selectors
    A list of selectors -> jQuery Selectors
    And the official website -> jQuery
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #3
    New to the CF scene
    Join Date
    Jun 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •