0

Why isn't this code working with jQuery 1.10.2, but with 1.8.3? Are there probably any minor changes to fix it?

$(document).ready(function(){
    $(".mob-nav-overlay").hide();
    $(".mob-nav-button").show(); 
    $('.mob-nav-button').toggle(function() {
        $("#mob-nav-close").html("x");
        $(".mob-nav-overlay").fadeIn("fast");
    })},
    function() {
        $("#mob-nav-close").text("#");
        $(".mob-nav-overlay").fadeOut("fast");
    })
});

Thanks a lot! Paul

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
Paul
  • 37
  • 5
  • This would help you http://stackoverflow.com/questions/14301935/where-has-fn-toggle-handlereventobject-handlereventobject-gone – Runcorn Jul 22 '14 at 14:45

1 Answers1

3

The .toggle() event was deprecated in jQuery 1.8 and removed in jQuery 1.9.

See http://api.jquery.com/toggle-event/

j08691
  • 204,283
  • 31
  • 260
  • 272