I make a website using bootstrap3.

When viewing from a mobile, you need to make a menu on the left. But that is not the question. The menu made on jQuery all works well in the desktop version (where it is later not needed and will be disabled)))) Problems arise on the mobile.

When you click the button, the site does not move away, but decreases (Adapting from a new size. When you turn off the meta name="viewport" content="width=device-width" everything works well, but this is certainly not an option.

  • perhaps it is more logical and in a number of parameters it would be better to make the menu using bootstrap (it has classes specifically for navigation) since you use it - Broouzer King
  • In Bootstrap, there are classes for the drop-down menu (((it doesn’t quite correspond to the site design. You just need to leave on the left with a screen shift - Zhenya Vedenin

1 answer 1

The main problem is in the meta name = "viewport" content = "width = device-width" tag. It scales the new content size to fit the screen and does not allow the image to be moved beyond its limits. The problem is solved by adding code to the button.

 $('meta[name="viewport"]').attr('content','initial-scale=1, user-scalable=no') 

It blocks scaling, plus prevents the user from manually changing the scale.