phone show error fixed

This commit is contained in:
vedatakd 2019-11-06 16:59:39 +03:00
parent 379d620d37
commit af7b3c9103
2 changed files with 38 additions and 3 deletions

View File

@ -0,0 +1,37 @@
function sendCount() {
var id = $('.show-number').attr('data-id');
if (id != "") {
$.ajax({
type: 'POST',
url: '/ajax/countPhone',
data: 'id=' + id,
success: function (data) {
hideLoader()
$('.show-number').removeAttr('data-function');
},
beforeSend: function () {
showLoader()
}
});
}
}
// -------------------------------------------------------------
// Show Mobile Number
// -------------------------------------------------------------
(function () {
$('.show-number').on('click', function () {
this.addEventListener('click', sendCount());
$('.hide-text').fadeIn(500, function () {
$(this).addClass('hide');
});
$('.hide-number').fadeIn(500, function () {
$(this).addClass('show');
});
});
}());
// script end

View File

@ -90,15 +90,13 @@
{% include "visiosoft.module.comparisons::comparison" %}
{% endif %}
{% if entries('advs').isEnabled('phoneclickcounter') %}
{{ asset_add("scripts.js", "visiosoft.module.phoneclickcounter::js/phoneCounter.js") }}
{% endif %}
{% if entries('advs').isEnabled('carts') %}
{{ asset_add("scripts.js", "visiosoft.module.carts::js/quantity.js") }}
{% endif %}
{{ asset_add("scripts.js", "visiosoft.theme.base::js/list-item.js") }}
{{ asset_add("scripts.js", "visiosoft.theme.base::js/phoneCounter.js") }}
{{ asset_add("scripts.js", "visiosoft.theme.base::js/viewed.js") }}
{% endblock %}