Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(){
- var contactForm = {
- container: $('#contact'),
- init: function(){
- $('<button></button>',{
- text: 'Contact Me'
- })
- .insertAfter('article:first')
- .on('click', this.show);
- },
- show: function(){
- contactForm.close.call(contactForm.container);
- contactForm.container.show();
- },
- close: function(){
- var $this = $(this);
- $('<span class=close>X</span>')
- .prependTo(this)
- .on('click', function(){
- $this.hide();
- })
- }
- };
- contactForm.init();
- })();
Add Comment
Please, Sign In to add comment