IMPROVEMENT: emulate links

This commit is contained in:
Tony Air 2020-02-06 22:15:25 +07:00
parent ed1a9b28e3
commit 30e018e929
4 changed files with 7 additions and 7 deletions

2
dist/js/app.js vendored

File diff suppressed because one or more lines are too long

2
dist/js/app.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@ import $ from 'jquery';
import Events from './_events';
const LayoutUI = ($ => {
const LayoutUI = (($) => {
// Constants
const W = window;
const D = document;

View File

@ -15,7 +15,7 @@ import FormBasics from './_components/_ui.form.basics';
import SmoothScroll from 'smooth-scroll';
const smoothScroll = SmoothScroll();
const MainUI = ($ => {
const MainUI = (($) => {
// Constants
const W = window;
const D = document;
@ -174,7 +174,7 @@ const MainUI = ($ => {
//
// scroll links
$('.js-scrollTo').on('click', e => {
$('.js-scrollTo').on('click', (e) => {
e.preventDefault();
const el = e.currentTarget;
const $el = $(e.currentTarget);
@ -203,7 +203,7 @@ const MainUI = ($ => {
}
// data-set links
$('[data-set-target]').on('click', e => {
$('[data-set-target]').on('click', (e) => {
const $el = $(e.currentTarget);
const $target = $($el.data('set-target'));
@ -227,7 +227,7 @@ const MainUI = ($ => {
});
// emulate links
$('.a[data-href]').on('click', e => {
$('.a[data-href]').on('click', (e) => {
const $el = $(e.currentTarget);
const href = $el.data('href');
if (!href.length) {