JS & JS Libraries

Test to see if JQuery works

Test to see if JQuery works


Test to see if JQuery works

This is the best way I have found to test if jQuery works. A simple colour change. Place this in your header before the body tags

  <script>
$(function(){
  $("button").mouseover(function(){
    var $p = $("#P44");
    $p.stop()
      .css("background-color","yellow")
      .hide(1500, function() {
          $p.css("background-color","red")
            .show(1500);
      });
  });
});
</script>

place this in the <body> tags:

<button>Test</button>

<p id="P44" class="test">
    Testing...
</p>

 

 

Published: 8th December 2016 by

Adverts