Skip to content

Instantly share code, notes, and snippets.

@kamalkhan
kamalkhan / functions.php
Created August 12, 2018 14:51
Action hook which enables you to listen to a new visitor
add_action('awesome_live_chat-new_visitor', function ($name, $email, $department, $website, $uri) {
// Custom code here.
}, 10, 5);
@kamalkhan
kamalkhan / component.js
Created April 16, 2017 12:56
Vue deep model directive
const component = Vue.extend({
template: `<input v-deep-model="'one.two.three'">`,
data() {
return {
one: { two: { three: 'foo' } }
};
}
});
@kamalkhan
kamalkhan / alc-trigger.js
Last active September 5, 2015 06:47
Awesome Live Chat - Custom trigger
(function($){
$(document).ready(function($){
$('.css-class').on('click', function(e){
e.preventDefault();
AwesomeLiveChat.vent.trigger('app:toggle');
});
})
})(jQuery);
@kamalkhan
kamalkhan / README.md
Last active December 2, 2015 00:52
A snippet to generate an infinite amount of semantic ui colored checkboxes

Semantic UI multi colored checkboxes

See - http://semantic-ui.com

A snippet to generate an infinite amount of colored checkboxes for (less)

@colors: red, green, blue, violet, pink, black, white;
.ui.toggle.checkbox {
    .-(@i: length(@colors)) when (@i > 0) {
 @c: extract(@colors, @i);