1/* 2 3 Version: 1.0.0 4 Author: Amir Rezaie 5 Website: 6 Repo: https://amir-rezaie.ir 7 */ 8 9(function ($) { 10 "use strict"; 11 $.fn.Collapzion = function (options) { 12 // Private Functions 13 function debug(e) { 14 console.log(e); 15 } 16 // Global Private Variables 17 var _base = this; 18 var _settings = $.extend({ 19 _pos: { 20 'position': 'fixed', 21 'left': '36px', 22 'bottom': '45px', 23 'text-align': 'center', 24 'padding': '0px 8px', 25 'margin-bottom': '34px', 26 'display': 'flex', 27 'justify-content': 'flex-end', 28 'z-index': '801', 29 }, 30 _child_attribute: [{ 31 'label': 'Post', 32 'url': '/', 33 'icon': '' 34 }], 35 _main_btn_color: '#0b8502;', 36 _child_btn_color: '#0761f6;' 37 }, options); 38 39 _base.init = function () { 40 _base.css(_settings._pos); 41 _base.append('<a style="background-color:' + _settings._main_btn_color + '" href="javascript:void(0)" class="_col_shadow _collapz_parant _close contactFire"></a>'); 42 43 $('#' + this.attr('id') + ' a._collapz_parant').on('click', function () { 44 var ths = $(this); 45 _base.collapz_btn(ths, _settings._child_attribute); 46 }); 47 }; 48 // toggle button 49 _base.collapz_btn = function (_element, child_attribute) { 50 if (_element.hasClass('_close')) { 51 52 _element.removeClass('_close'); 53 _element.addClass('_open'); 54 55 var _child_el = '<ul class="_child_collapzion">'; 56 jQuery.each(child_attribute, function (i, val) { 57 _child_el += '<li><a href="' + val.url + '" class=""><div class="float-contact"><span class="_title ">' + val.label + '</span><div class="icon"><i class="' + val.icon + '"></i></div></div></a></li>'; 58 }); 59 _child_el += '</ul>'; 60 61 _element.parent().append(_child_el); 62 $("._child_collapzion").css({ 63 'transform': 'translate3d(0, -100%, 0)' 64 }); 65 66 } else { 67 $("._child_collapzion").css({ 68 'transform': 'translate3d(0, 0%, 0)' 69 }); 70 $(this).parent().find('ul._child_collapzion').remove(); 71 _element.removeClass('_open'); 72 _element.addClass('_close'); 73 } 74 } 75 _base.clicker = function (e) { 76 debug(e); 77 }; 78 _base.init(); 79 } 80 81}(jQuery)); 82 83 84$(document).ready(function () { 85 $(".contactFire").click(function () { 86 /// toggle class for div #contactOverlay 87 ///location in body 88 $("#contactOverlay").toggleClass("overlay"); 89 90 ///delete and collapte contact button and overlay div 91 $(".overlay").click(function () { 92 $(".contactFire").removeClass("_open"); 93 $(".contactFire").addClass("_close"); 94 $("#contactOverlay").removeClass("overlay"); 95 $("._child_collapzion").remove(); 96 }) 97 98 }) 99 100}); 101 102//// end config floating contact
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.