Category: Websites Development
Hits: 6879

The beauty of this plugin is that this plugin can be used to convert text to uppercase, lowercase, title case and pascal case. 

Features

 

Demo

 

 

How to use it?

 

<script type="text/javascript"
src="https://jquery-blog-js.googlecode.com/files/SetCase.js">
</script>

This plugin can be used for textbox and you need to set the case which you want to implement on textbox. All you need to do is to set "caseValue" property value to one of the following value.

 

Note: All the values are in lower case. Upper case:

 
<script type="text/javascript"
src="https://jquery-blog-js.googlecode.com/files/SetCase.js"> 

</script>

 

Lower case:

 

$(function() {
    $("#txtLower").Setcase({caseValue : 'lower'});
});

 

Title case: First letter of entered text is capital and rest are in lower case.

 

$(function() {
    $("#txtTitle").Setcase({caseValue : 'title'});
});

 

Pascal case: Every first letter of the word is set to capital.

$(function() {
    $("#txtPascal").Setcase({caseValue : 'pascal'});
});
By default, this plugin changes the case as user types. There is an option "changeonFocusout", which allows to override default setting and changes case once the focus moves out of textbox.
$(function() {
    $("#txtUpper").Setcase({caseValue : 'upper', changeonFocusout: true});
});
See live Demo and Code
You can also download the plugin from below link.
Download Plugin
Original Article