javascript - $.get is not a function -


i want data on js , therefore "develop" small script. haven't worked js/jquery long time , i'm facing basic problem. tried replace $ jquery got same error.

html

<html> <head>     <script type="text/javascript" src="jquery-3.1.1.slim.min.js"</script>"></script>     <script type="text/javascript" src="main.js"</script>"></script> </head> <body>     <button>test</button> </body> 

js

jquery(document).ready(function(){     jquery("button").click(function(){         jquery.get("mydomain", function(data, status){             alert("data: " + data + "\nstatus: " + status);         });     }); }); 

you referencing jquery slim, doesn't include (among other things) ajax functions such .get().

you need reference full version of jquery instead.

see link more detailed description of , not included in slim build: https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -