c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
JQuery

Hello world using Jquery?

| | JavaScript , JQuery

Every decent programming start with a"Hello, world!" example, before you can start writing your own code,but just to make sure that everything is working, and for you to see how simple jQuery is, let's kick off with a little example:

<div id="divExample1"></div>
<script type="text/javascript">
    $("#divExample1").text("Hello, world!");
</script>

 

$ is shortcut to access jQuery.

Same above example implemented using JavaScript without help from jQuery.

 <div id="divExample2"></div>
<script type="text/javascript">
    document.getElementById("divExample2").innerHTML = "Hello, world!";
</script>

Output:

Hello,world!