| 1 |
jQuery(document).ready(function ($) { |
| 2 |
var smSelectTab = function (tab) { |
| 3 |
var $tab = $('.nav-tab-wrapper').find("[href='" + tab + "']") |
| 4 |
if ($tab.size() != 0) { |
| 5 |
$tab.addClass('nav-tab-active').siblings().removeClass('nav-tab-active') |
| 6 |
$(tab).addClass('active').siblings().removeClass('active') |
| 7 |
} |
| 8 |
} |
| 9 |
|
| 10 |
var tab = window.location.hash |
| 11 |
smSelectTab(tab) |
| 12 |
|
| 13 |
$('.stless_setting_tab').on('click', function (e) { |
| 14 |
e.preventDefault() |
| 15 |
|
| 16 |
var tab = $(this).attr('href') |
| 17 |
smSelectTab(tab) |
| 18 |
}) |
| 19 |
|
| 20 |
$(document).on('click', '.pointer', function (e) { |
| 21 |
e.stopPropagation() |
| 22 |
var pointer = $(this) |
| 23 |
pointer |
| 24 |
.pointer({ |
| 25 |
content: |
| 26 |
'<h3>' + |
| 27 |
pointer.data('title') + |
| 28 |
'</h3><p>' + |
| 29 |
pointer.data('text') + |
| 30 |
'</p>', |
| 31 |
position: pointer.data('position'), |
| 32 |
}) |
| 33 |
.pointer('open') |
| 34 |
}) |
| 35 |
|
| 36 |
$(document).on('click', function () { |
| 37 |
$('.wp-pointer').hide() |
| 38 |
}) |
| 39 |
|
| 40 |
$(document).on('click', '.wp-pointer', function (e) { |
| 41 |
e.stopPropagation() |
| 42 |
}) |
| 43 |
}) |
| 44 |
|