jquery not working in css

I'm having trouble getting my code to work and I'm not sure why. Here is the link to the jsfiddle.

Js fiddle

$(document).ready(funciton() {
  $("button").click(function() {
    $("h1").css("color", "red");
  Make the h1 red

Answers 1

  • you have to include the jquery library link in order to use the jquery nomenclature.

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

    Also you have a typo in the first line

    $(document).ready(funciton() {...

    should be

    $(document).ready(function() {...

Related Articles