Simple push buttons for a responsive website to make a direct call, mail or sms. A great marketing tool if you want to get in direct contact with your mobile visitors. Works with jquery, a small css file and a simple tag in your webpage. The package contains 12 ready to use theme colors
jQuery will detect if a visitor uses a mobile phone so the sms and call buttons will work on those devises.
For a real demo visit this website and resize your browser smaller then 480px. You will see the buttons appear on the images.
Thank you for purchasing the Contact push buttons. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Thanks so much!
Here is the general structure. In this example I use html5 but it can also be used with any other DOCTYPE
<!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <title>Your site</title> <link rel="stylesheet" type="text/css" media="screen" href="css/call-us.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript" src="js/call-us_min.js"></script> <script> $(document).ready(function() { $('.link').call_us({ theme: 'blue', type: 'tel', testing: true /* other options here */ }); }); </script>
Just add one of these tag's anywhere on your page where you want the push button
tell: for phone , sms: for text messaging or email: for a email
?subject= for the email and ?body= for the SMS are optional
<span class="call_us_wrap"><a href="tel:+3112345678" class="link">Call Us</a></span> <span class="call_us_wrap"><a href="mailto:test@test.com?subject=Just a mail" class="link2">Mail Us</a></span> <span class="call_us_wrap"><a href="sms:+3112345678?body=Just a message" class="link3">SMS Us</a></span>
Normally the call-us.js will check if the device is an mobile.
But if you want to use it with an responsive website and or check on your desktop you will have to add some css
/* Use this only for a responsive website */ .call_us_wrap { display: none; } @media only screen and (max-width: 480px) { .call_us_wrap{ display: inline-block; } } And set the param in the js testing: true
Here the stylesheet file I'm using with the CALL US button
File Name | Description |
---|---|
call-us.css |
The css file you need to include in your website |
img/call_icon.png |
icons |
img/close_icon.png |
icons |
img/mail_icon.png |
icons |
The js needed for the CALL US button
Tag | Description |
---|---|
jquery.js |
jQuery is a Javascript library that greatly reduces the amount of code that you must write. |
call-us.js |
The js code for the CALL US buttons |
Here all all the options available for the CALL US button
/* --- @ CALL US options ---*/ $('.orange').call_us({ theme: 'blue', type: 'tel', tel: false, sms: false, email: false, icon: true, closeable: true, remember: false, time: 1, testing: true });
Here's a brief information about the js options for the CALL US buttons
I've used the following files as listed.
Once again, thank you so much for purchasing this app. As I said at the beginning, I'd be glad to help you if you have any questions relating to this app. No guarantees, but I'll do my best to assist.
Ceasar