Problems with jQuery calls

</script>
    <script>
        var z = jQuery.noConflict();
        jQuery(function(){
            alert("hello");
        })
        z(function () {
            alert("world");
        })
    </script>
</head>
<body>
    <div></div>
</body>
</html>
The

code is shown above, using the noConflict () method, but you can still use jQuery to call the method, or z to call it. Shouldn"t you be able to call it with jQuery?

Mar.02,2021

  1. noConflict acts on $, not jQuery
  2. there is no conflict of $ in your code

The

noConflict method only works on $, not jQuery

see

http://api.jquery.com/jQuery.


you should use it this way:

  http://api.jquery.com

					
Menu