Javascript not working on production server

Javascript not working on production server

Hi there,

Im working on a project where i need to hide the menu on tablets and small desktops and make it behave like on a phone (you need to push a button and it comes out like a drawer). Since the application will mostly be used on tablets I decided to use the dublin theme.

So to achive the drawer functionality I had to fiddle with the CSS and write Javascript and it works really well... on the development server. So now when you resize the window (on the development server) you can see it in action, tablet and small desktop work perfectly, the menu slides away and it looks really nice. Same thing happens on the tablet. But when you try doing this on the production server nothing happens except for the CSS changes I made (have in mind that this bug is only happening in a browser on a PC, using a tablet to view the prod server works very well). The menu does not slide away (done with javascript) like it should but the main content of the site slides underneath the menu (done with CSS). 

So the way I did it is that I have an on document ready listener that checks to see if the .Page has the classes .tablet or .Desktop.small. If it does then I assign some CSS classes I wrote and add a clickListener to the menu-button (it only appears on phones unless you fiddle with the CSS) that toggles Menu-open, Menu-closed css classes (that I wrote). This is very similar to how Outsystems does this and again, works like a charm on the development server but not on the production server. 

I hope you get a clear picture of what I'm saying but is there a reason for this? Any suggestions as to how to fix this ?

With best regards,


And as soon as i hit the Send button I see what is going on. On the development server there is something called "Device emulation". You can turn it on and off by clicking the cogwheel that appears with the screen overlay when you resize the window. 

Is there a way to turn this feature on (with out the overlay) on the production server ?