Jquery on()

Hello all!

I have a problem with jquery, I have this function

$(document).ready( function() {
    var button = $('#edit_race');
    button.on('click', function() {

If I run it here


It works but when I run it on my machine it doesn’t, it gives me an error: button.on is not a function, Jquery is loaded as I am using it also for other things in the page and everything else works fine except this, I am running this in Joomla could it be a problem with Mootools interfering?

I was using the wrong version of jQuery!