K
K
Kovalsky2015-10-02 15:28:57
css
Kovalsky, 2015-10-02 15:28:57

How to view the full version of a responsive site from a mobile phone?

Given:
1. WordPress site,
2. Responsive Theme Optimizer,
3. <meta content="width=device-width, initial-scale=1.0" name="viewport">
4. iOS 8 iPhone client using safari ,
Task: to show the client the full version of the site, without depriving him of the pleasure of using his beloved sixth iPhone.
Is it possible to solve the problem without changing the conditions? I have never even touched an iPhone, so how can there be some checkbox in the safari settings that causes the browser to ignore meta ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivanq, 2015-10-02
@lazalu68

It definitely is in chrome

S
Sasha Ulych, 2015-10-02
@backflipper

Add a button to the site of the mobile version, and as an example, the code below, when clicked, sets viewport width= 1101px, then when clicked again returns viewport width = device-width

$(document).ready(function(){
// viewport stuff
var targetWidth = 1101;
var deviceWidth = 'device-width';
var viewport = $('meta[name="viewport"]');

// check to see if local storage value is set on page load
localStorage.isResponsive = (localStorage.isResponsive == undefined) ? 'true' : localStorage.isResponsive;

var showFullSite = function(){    
    viewport.attr('content', 'width=' + targetWidth);  
    
    if(!$('#view-options #view-responsive').length){
        $('#view-options').append('<div id="view-responsive" class="blue_button">Мобильная версия сайта</div>');
    }    
    
    localStorage.isResponsive = 'false';
    console.log('no');
}

var showMobileOptimized = function(){
    localStorage.isResponsive = 'true';
    viewport.attr('content', 'width=' + deviceWidth);
    console.log('yes');
}

// if the user previously chose to view full site, change the viewport
if(Modernizr.localstorage){
    if(localStorage.isResponsive == 'false'){
        showFullSite();
    }
}    

$("#view-full").on("click", function(){
    showFullSite();
});
$(document).on('click', '.parent_order', function() { 

});
$('#view-options').on("click", "#view-responsive", function(){
    showMobileOptimized();
});
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question