While writing code in jQuery, I often use .text() method to get the content of any element from DOM. This function is straight forward, it strips off all the html element from a selected element and returns the remaining text.
So for below element the .text() method will return "A quick brown fox".
A quick brown fox
Have you ever used textarea in your UI design to get text from user? (Ofcourse you must) :) You must have specified rows and cols attribute to define the height and width of the textarea, or by using CSS. By whatever mean you create your textarea, the width and height of the textarea is fixed. What ...
Autocomplete is a common feature available in lot of web tools and services. You will find lots of implementation of autocomplete features. Let us see how can we implement a simple Autocomplete feature for Country names in Java-JSP and jQuery.
Related: Spring MVC - AutoComplete tutorial with JSON & JQuery
We will use jQuery's autocomplete plugin
for our example. Just go to JQuery Autocomplete ...
Tagging the content has increased the searchability of content in todays Web 2.0 world. Also similar content can be grouped together by assigning them same tags.
Tag Cloud has became a good way of displaying the weighted tags in a manner easy to understand and search. You can find a lot of code written in all ...
Maxlength of Textarea
Update: The maxlength plugin is now managed at GitHub. Please contribute to make this plugin more awesome.
Setting up maxlength of input text are easy. Just an attribute maxlength="##" does the work. But maxlength attribute does not work with textarea. I tried writing <textarea rows="5" cols="30" maxlength="120"></textarea> but this does not works.
So what to do if we want to fix ...