Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>  
  <script src="https://code.jquery.com/jquery-3.1.0.js"></script>
  <title>JS Bin</title>
</head>
<body>
  <button id="myButton">click</button>
</body>
</html>
 
$('#myButton').click(function() {})
(function ($) {
    $.fn.myFunction = function (opt) {
      alert("inside myFunction")
    }
})(jQuery);
$('.lala').myFunction()
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
chengtiepro
0viewers