jQuery Plugin For Better SubDomain Name Input - ghostInput

File Size: 3.67KB
Views Total: 1804
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
jQuery Plugin For Better SubDomain Name Input - ghostInput

ghostInput is a simple jQuery plugin for creating a custom text suffix (like a sub domain name) appending to the entering text in the input field.

How to use it:

1. Include jQuery library and jQuery ghostInput plugin in the page.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> 
<script type="text/javascript" src="../src/jquery.ghostinput.js"></script> 

2. Create the input fields.

<!--Auto intializing with rel attribute -->
<input type="text" rel="ghostInput" placeholder="Type anything here to append ghost text" />
<!--Initialize with javascipt -->
<input type="text" placeholder=".domain.com" />

3. Initialize the plugin with custom text suffix.

<script type="text/javascript">
$(function() {
ghostPlaceholder:".jqueryscript.net - Enter Sub Domain",
ghostTextClass: "ghost-text"

Change log:


  • Fixed URL

This awesome jQuery plugin is developed by godpod. For more Advanced Usages, please check the demo page or visit the official website.