context Property - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:context

Description

The context property was deprecated in version 1.8 and removed in jQuery version 3.0.

The context property contains the original context passed to jQuery.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("button").on("click",function(){
        var c = $().context;//  w ww . j a v  a2  s .c  o m
        console.log("You are running jQuery: " + c);
    });
});
</script>
</head>
<body>

<button>Click me!</button>

</body>
</html>

Related Tutorials