Writing forms is a very common task while developing web applications. But if you need a form you should validate it. Very often it comes to server-side validation, but not necessarily every time. And here jQuery provides a very useful API for rapid creation of client-side form validation. Let’s take a closer look. ...
Read More »Home »
jQuery remove class example
Very often on a webpage we need to change the visual representation of a DOM element to display some non-text information like changing a color to red that would mean some error or warning, or probably changing parameters of an element on mouseenter event. All of this can be implemented using an elegant combination of css and javascript. But practically ...
Read More »jQuery Submit Form Example
Forms are probably the most common elements of UI design. When using forms, we usually need to perform some actions before submitting, perhaps validation or anything else. Using javascript we can handle submit events, which occur when clicking submit button or pressing enter. In this article we’ll discuss how to do it using jQuery. We should just define a code ...
Read More »jQuery mouseover example
Javascript is essentially a very good tool for tracking events on a web page and changing some view options after user actions. We can track mouse clicks, mouse movements, key’s ups and downs and a lot of other user activity. All this stuff can be done using jQuery and in this article we’ll consider its approach how to perform actions ...
Read More »Javascript forEach Example
Very often we run in cases when we just have a collection of elements and a necessity to loop through it. EcmaScript5 suggests a simple forEach() method for such purpose. So, if you’re tired of writing countless for (var i = 0; i < arr.length; ++i) loops, let’s look how it works. For ...
Read More »Javascript Array Length Example
Every programmer learning a new language has to study the way it manages arrays and their size. In native Javascript, length is a property of every array and obviously it is used to retrieve or set the length of that array. The length property is a part of the Array prototype and may be a non-negative integer less then 232. ...
Read More »Javascript document.write() example
In this article we’ll consider some examples of using document.write() method. This method is commonly used for testing and dynamically generating page content while it’s loading. It’s a fast way to modify the document and may be used as an alternative to other approaches which are more suitable when the DOM is completely ready. Take ...
Read More »