Skip to content

Instantly share code, notes, and snippets.

@naiquevin
Created October 12, 2012 08:01
Show Gist options
  • Save naiquevin/3877893 to your computer and use it in GitHub Desktop.
Save naiquevin/3877893 to your computer and use it in GitHub Desktop.
KodeCRM snippets
.myKodecrmButton {
display: block;
background: #08C;
color: #fff;
padding: 5px;
}
<!-- begin custom KodeCRM chat with us button -->
<a href="javascript:void(0);" id="kcrmBtn" class="myKodecrmButton">Chat with us!</a>
<!-- end custom KodeCRM chat with us button -->
$(document).ready(function () {
var appid = '<Your appid>';
var url = 'http://api.kodecrm.com/seller/'+appid+'/availability?callback=?';
$.getJSON(url, [], function (data, textStatus, jqXHR) {
console.log(data, textStatus);
// do something with the data
});
});
var kodecrmJsonp = function (resp) {
console.log(resp);
// do something with the data
};
var appid = '<Your appid>';
var elem = document.createElement('script');
elem.type = 'text/javascript';
elem.src = 'http://api.kodecrm.com/seller/'+appid+'/availability?callback=kodecrmJsonp';
document.body.appendChild(elem);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment