Skip to content

Commit e39c7c9

Browse files
committed
fix
1 parent 037d922 commit e39c7c9

File tree

2 files changed

+55
-59
lines changed

2 files changed

+55
-59
lines changed

contact.html

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<body>
2424

2525
<div class="page-wrapper">
26-
26+
2727
<!-- Main Header-->
2828
<header class="main-header">
2929
<!--Header-Upper-->
@@ -179,24 +179,6 @@ <h5><a href="#">Hotel Information (if needed)</a></h5>
179179
</div>
180180
</div>
181181
</div>
182-
183-
<div class="map-box">
184-
<!--Map Canvas
185-
<div class="map-canvas"
186-
data-zoom="12"
187-
data-lat="-37.817085"
188-
data-lng="144.955631"
189-
data-type="roadmap"
190-
data-hue="#ffc400"
191-
data-title="Envato"
192-
data-icon-path="images/icons/map-marker.png"
193-
data-content="Melbourne VIC 3000, Australia<br><a href='mailto:info@youremail.com'>info@youremail.com</a>">
194-
</div>
195-
</div>
196-
197-
</section>
198-
End Location Section -->
199-
200182
<!-- Contact Page Section -->
201183
<section class="contact-page-section">
202184
<div class="anim-icons">

js/script.js

Lines changed: 54 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
(function($) {
2-
2+
33
"use strict";
4-
5-
4+
5+
66
//Hide Loading Box (Preloader)
77
function handlePreloader() {
88
if($('.preloader').length){
99
$('.preloader').delay(200).fadeOut(500);
1010
}
1111
}
12-
13-
12+
13+
1414
//Update Header Style and Scroll to Top
1515
function headerStyle() {
1616
if($('.main-header').length){
@@ -26,14 +26,14 @@
2626
}
2727
}
2828
}
29-
29+
3030
headerStyle();
31-
32-
31+
32+
3333
//Submenu Dropdown Toggle
3434
if($('.main-header li.dropdown ul').length){
3535
$('.main-header li.dropdown').append('<div class="dropdown-btn"><span class="fa fa-angle-down"></span></div>');
36-
36+
3737
//Dropdown Button
3838
$('.main-header li.dropdown .dropdown-btn').on('click', function() {
3939
$(this).prev('ul').slideToggle(500);
@@ -43,7 +43,7 @@
4343
$('.main-header .main-menu li.dropdown .dropdown-btn').on('click', function() {
4444
$(this).prev('.mega-menu').slideToggle(500);
4545
});
46-
46+
4747
//Disable dropdown parent link
4848
$('.main-header .navigation li.dropdown > a,.hidden-bar .side-menu li.dropdown > a').on('click', function(e) {
4949
e.preventDefault();
@@ -101,7 +101,7 @@
101101
items:1
102102
},
103103
}
104-
});
104+
});
105105
}
106106

107107
//Events Carousel
@@ -129,7 +129,7 @@
129129
items:1
130130
},
131131
}
132-
});
132+
});
133133
}
134134

135135

@@ -156,7 +156,7 @@
156156
items:1
157157
}
158158
}
159-
});
159+
});
160160
}
161161

162162
//About Carousel
@@ -183,17 +183,17 @@
183183
items:1
184184
}
185185
}
186-
});
186+
});
187187
}
188188

189189
//Fact Counter + Text Count
190190
if($('.count-box').length){
191191
$('.count-box').appear(function(){
192-
192+
193193
var $t = $(this),
194194
n = $t.find(".count-text").attr("data-stop"),
195195
r = parseInt($t.find(".count-text").attr("data-speed"), 10);
196-
196+
197197
if (!$t.hasClass("counted")) {
198198
$t.addClass("counted");
199199
$({
@@ -211,17 +211,17 @@
211211
}
212212
});
213213
}
214-
214+
215215
},{accY: 0});
216216
}
217-
218-
217+
218+
219219
//Tabs Box
220220
if($('.tabs-box').length){
221221
$('.tabs-box .tab-buttons .tab-btn').on('click', function(e) {
222222
e.preventDefault();
223223
var target = $($(this).attr('data-tab'));
224-
224+
225225
if ($(target).is(':visible')){
226226
return false;
227227
}else{
@@ -238,31 +238,31 @@
238238
//Accordion Box
239239
if($('.accordion-box').length){
240240
$(".accordion-box").on('click', '.acc-btn', function() {
241-
241+
242242
var outerBox = $(this).parents('.accordion-box');
243243
var target = $(this).parents('.accordion');
244-
244+
245245
if($(this).hasClass('active')!==true){
246246
$(outerBox).find('.accordion .acc-btn').removeClass('active ');
247247
}
248-
248+
249249
if ($(this).next('.acc-content').is(':visible')){
250250
return false;
251251
}else{
252252
$(this).addClass('active');
253253
$(outerBox).children('.accordion').removeClass('active-block animated fadeInUp');
254254
$(outerBox).find('.accordion').children('.acc-content').slideUp(300);
255255
target.addClass('active-block animated fadeInUp');
256-
$(this).next('.acc-content').slideDown(300);
256+
$(this).next('.acc-content').slideDown(300);
257257
}
258-
});
258+
});
259259
}
260260

261261
//Custom Seclect Box
262262
if($('.custom-select-box').length){
263263
$('.custom-select-box').selectmenu().selectmenu('menuWidget').addClass('overflow');
264264
}
265-
265+
266266

267267
if($('.timer').length){
268268
$(function(){
@@ -296,7 +296,7 @@
296296
mainClass: 'mfp-fade',
297297
});
298298
}
299-
299+
300300
//LightBox / Fancybox
301301
if($('.lightbox-image').length) {
302302
$('.lightbox-image').fancybox({
@@ -319,11 +319,11 @@
319319
$( "input.property-amount" ).val( ui.values[ 0 ] + " - " + ui.values[ 1 ] );
320320
}
321321
});
322-
323-
$( "input.property-amount" ).val( $( ".price-range-slider" ).slider( "values", 0 ) + " - $" + $( ".price-range-slider" ).slider( "values", 1 ) );
322+
323+
$( "input.property-amount" ).val( $( ".price-range-slider" ).slider( "values", 0 ) + " - $" + $( ".price-range-slider" ).slider( "values", 1 ) );
324324
}
325-
326-
325+
326+
327327
//Contact Form Validation
328328
if($('#contact-form').length){
329329
$('#contact-form').validate({
@@ -341,8 +341,8 @@
341341
}
342342
});
343343
}
344-
345-
344+
345+
346346
// Scroll to a Specific Div
347347
if($('.scroll-to-target').length){
348348
$(".scroll-to-target").on('click', function() {
@@ -351,11 +351,25 @@
351351
$('html, body').animate({
352352
scrollTop: $(target).offset().top
353353
}, 1500);
354-
354+
355355
});
356356
}
357-
358-
357+
358+
// Contact Form
359+
$('#contact-form').on('submit', function(e) {
360+
e.preventDefault();
361+
362+
const formElements = e.target.elements;
363+
const name = formElements.name.value;
364+
const email = formElements.email.value;
365+
const message = formElements.message.value;
366+
367+
const linebreak = '%0D%0A';
368+
369+
window.location.href = `mailto:unstack@gmail.com?subject=Contact Us&body=Hi, Unstack!${linebreak}${linebreak}Action required from @${email}.${linebreak}${linebreak}${message}${linebreak}${linebreak}Best regards,${linebreak}${name}`
370+
});
371+
372+
359373
// Elements Animation
360374
if($('.wow').length){
361375
var wow = new WOW(
@@ -374,17 +388,17 @@
374388
/* ==========================================================================
375389
When document is Scrollig, do
376390
========================================================================== */
377-
391+
378392
$(window).on('scroll', function() {
379393
headerStyle();
380394
});
381-
395+
382396
/* ==========================================================================
383397
When document is loading, do
384398
========================================================================== */
385-
399+
386400
$(window).on('load', function() {
387401
handlePreloader();
388-
});
402+
});
389403

390404
})(window.jQuery);

0 commit comments

Comments
 (0)