Search code examples
jqueryhtmlmasking

i want to use a specific symbol masking in an html text field using jquery


I want to use a particular masking on a text field in which the symbol will be on the right of the field. Mostly we see in bootstrap, but i need it without bootstrap and using jquery. Although it is bit difficult to explain but i can attach an image of my requirement. enter image description here


Solution

  • I don't know why you would want to use jquery to do something like this. Isn't a simple css class with some markup enough?

    Something like this:

    background: url(http://www.veryicon.com/icon/png/System/Fugue/edit%20percent.png) right no-repeat;
    padding-right: 15px;
    

    I made you a little jsfiddle to show how I would do it. Sure it isn't as fancy but you could add additional css styling to spice it up.

    http://jsfiddle.net/DtkQF/