0

When I try in jsfiddle it's work but if didn't work on my website. Anyone can help me?

$("#listReason").on("change",function(){

if($(this).val() == "Hack")
  $("#banlength").val("0");

});
5
  • 4
    Is JQuery loadinfg properly before you execute this script? Commented Aug 11, 2016 at 14:20
  • What exactly is not a function? Commented Aug 11, 2016 at 14:20
  • And the full error message is... Commented Aug 11, 2016 at 14:20
  • Make sure JQuery.js is loaded, but also you might need to make sure "listReason" is loaded also, by putting this in an onload function i.e. wrapping your code here with $( document ).ready(function() {}); Commented Aug 11, 2016 at 14:23
  • 1
    what error message did you get? Commented Aug 11, 2016 at 14:24

1 Answer 1

1

You should post your html, but make sure you reference jquery before this function is called

<script src="https://code.jquery.com/jquery-3.0.0.js"></script>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.