We help IT Professionals succeed at work.
Get Started

Javascript question:   TypeError:  $(...).on is not a function

willsherwood asked
Last Modified: 2015-09-14
I'm using the following script.  Can anyone help debug?     Thank you!


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

<script type="text/javascript">

$(document).ready(function() {  // script wrapper

      $('textarea, input').on('blur', function() {
            var itemID = $(this).attr('id');
            var itemVal = $(this).val();
            var itemVal = itemVal.replace(/\n/g, '<br />');
            var itemVal = itemVal.replace(/&/g, 'and');
            var itemstring = "ID=" + itemID + "&value=" + itemVal;

      function processChange(itemstring){
            //return false;
                  type: "GET",
                  url: "php/update.php",
                  data: itemstring,
                  complete: function(data) {
                        var Resp = data.responseText;
                  success: function() {
                        $('#saved').css('display', 'block');
                        setTimeout(function() {
                                    opacity: 0,
                              }, 500, function(){
                                    $('#saved').css('display', 'none').css('opacity', '1');
                        }, 1000);
      }// end ProcessChange

}); // end script wrapper

Watch Question
Senior Software Developer
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE