Skip to content

c-warnick/SmartyStreets-jQuery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

SmartyStreets-jQuery

jQuery plugin for Smart Streets API

Smarty Street jQuery Plugin

How to implement Smarty Street Plugin

When implementing the Smarty Stree Plugin two script tags must be added.

<script src="https://d79i1fxsrar4t.cloudfront.net/sdk/1.4.0/smartystreets-sdk-1.4.0.min.js"></script>
         <script name="SmartyStreets-jQuery" src="/Scripts/SmartyStreets-jQuery.js?ver=1" websiteKey='<WebsiteKey>'></script>

The smartystreets-sdk script must be placed in the header and the SmartyStreets-jQuery tag must be placed just above the closing body tag with the SmartyStreets WebsiteKey passed as a parameter.

The plugin has been design to be initiated through a jQuery chain call.

$('field').Smarty();

or through a data attribute on html nodes (recommended)

<input type="text" id="txtAddressOne" datafield="AddressOne" Placeholder="Address 1" autocomplete="new-password" data-smarty="txtAddressTwo,txtCity,txtState,txtZip"/>

The data-smarty attribute utilizes comma delimited list of other field. The field ids must match the ids of the fields you want to populate and also contain on of the following strings "AddressOne","AddressTwo","City","State","Zip" to map address values correctly. However, if the attribute is left blank the values will be concatenated into the initalizing field.

About

jQuery plugin for Smart Streets API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published