What does “async: false” do in jQuery.ajax()?

Does it have something to do with preventing other events on the page from firing? Yes. Setting async to false means that the statement you are calling has to complete before the next statement in your function can be called. If you set async: true then that statement will begin it’s execution and the next … Read more

Uncaught TypeError: Cannot read property ‘msie’ of undefined – jQuery tools

The $.browser method has been removed as of jQuery 1.9. jQuery.browser() removed The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9. If needed, it is available as part of the jQuery Migrate plugin. We recommend using feature detection with a library such as Modernizr. — jQuery Core 1.9 Upgrade Guide. As stated in the Upgrade Guide you … Read more

How to use html.ValidationMessageFor

It was silly simple…..I just didn’t add the ErrorMessage field as part of the [Required] decorator. For example: Now, if a user either doesn’t enter anything in the name fields, or enters something over 30 characters, the Post method doesn’t get executed and the user gets a little message telling them what’s wrong.

How do I set/unset a cookie with jQuery?

Update April 2019 jQuery isn’t needed for cookie reading/manipulation, so don’t use the original answer below. Go to https://github.com/js-cookie/js-cookie instead, and use the library there that doesn’t depend on jQuery. Basic examples: See the docs on github for details. Before April 2019 (old) See the plugin: You can then do: To delete: Additionally, to set a timeout … Read more