- Did you mean
- grey silver earings
- great silver earring
- Related search terms
- earrings gold color white charm
- earrings enabl silver oxidised
- earrings gold color white chic
- earring gold color colour
- earring golden color colour
' +
'
';
// Existing modal remove karo
$('#mobile-quickview').remove();
// Add to body
$('body').append(modalHtml);
// Show modal
$('#mobile-quickview').show();
isMobileQuickViewOpen = true;
// IMPORTANT: Replace state instead of push state
// Yeh history mein new entry add nahi karega
var encodedUrl = encodeURIComponent(productUrl);
history.replaceState({quickview: true}, '', '#quickview=' + encodedUrl);
}
function closeMobileQuickView() {
$('#mobile-quickview').hide().remove();
isMobileQuickViewOpen = false;
currentQuickViewUrl = '';
// IMPORTANT: Original hash restore karo ya hash remove karo
if (currentHash && currentHash !== '#') {
history.replaceState(null, '', currentHash);
} else {
history.replaceState(null, '', window.location.pathname + window.location.search);
}
currentHash = '';
}
// Close button events
$(document).on('click', '.mobile-quickview-close', function() {
closeMobileQuickView();
});
// Modal overlay par click
$(document).on('click', '#mobile-quickview', function(e) {
if (e.target.id === 'mobile-quickview') {
closeMobileQuickView();
}
});
// ESC key
$(document).on('keydown', function(e) {
if (e.keyCode === 27 && isMobileQuickViewOpen) {
closeMobileQuickView();
}
});
// **Improved hash change detection**
$(window).on('hashchange', function() {
var hash = window.location.hash;
console.log('Hash changed:', hash);
if (hash.includes('quickview=')) {
var encodedUrl = hash.split('quickview=')[1];
var productUrl = decodeURIComponent(encodedUrl);
// Agar mobile hai aur modal open nahi hai
if (isMobileDevice() && !isMobileQuickViewOpen) {
openQuickViewMobile(productUrl, 'Product Quick View');
}
// Agar desktop hai to direct product page par redirect
else if (!isMobileDevice()) {
window.location.href = productUrl;
}
}
// Agar hash nahi hai aur modal open hai
else if (!hash && isMobileQuickViewOpen) {
closeMobileQuickView();
}
});
// **Improved back button handling**
$(window).on('popstate', function(event) {
console.log('Popstate triggered:', event.state);
// Agar modal open hai aur back button press hua
if (isMobileQuickViewOpen) {
if (event.state && event.state.quickview) {
// Quickview state hai, kuch nahi karo
return;
}
// Modal close karo
closeMobileQuickView();
}
});
// Page load par
$(document).ready(function() {
console.log('Page loaded with hash:', window.location.hash);
var hash = window.location.hash;
if (hash.includes('quickview=')) {
var encodedUrl = hash.split('quickview=')[1];
var productUrl = decodeURIComponent(encodedUrl);
if (isMobileDevice()) {
// Thoda delay karo taki page properly load ho
setTimeout(function() {
openQuickViewMobile(productUrl, 'Product Quick View');
}, 300);
} else {
// Desktop par direct redirect
window.location.href = productUrl;
}
}
// Physical back button handle karne ke liye
initBackButtonHandling();
});
// **Physical back button handling for Android/iOS**
function initBackButtonHandling() {
// Android back button
document.addEventListener('backbutton', function(e) {
if (isMobileQuickViewOpen) {
e.preventDefault();
closeMobileQuickView();
return false;
}
}, false);
// iOS swipe back gesture
$(document).on('touchstart', function(e) {
if (isMobileQuickViewOpen) {
e.preventDefault();
}
});
}
});
' +
'' +
'
' +
'
Sign In
Registered Customers
Create New Account
Sign In With OTP
Enter phone number.
We will send an otp on this number via SMS
Sign In with OTP
Enter OTP
Sign In With Otp
Sign In For Product Restock Notification
Enter phone number.
We will send an otp on this number via SMS
Verify Otp
Create New Account