Forum Discussion

dhiraj_gophane's avatar
11 years ago

can we use javascript in mobile header?

Hi,

I want to fetch host url for current logged in user using javascript "window.location.host".

can I use it in mobile header in skin wrapper?

I'm trying but its not working.

is there any specific approach for it?

 

  • NicoB's avatar
    NicoB
    Lithium Alumni (Retired)
    Hi,
    you can definitely do that.
    Only make sure to embed the JS code in the right skin.
    We provide two skin wrappers, one for desktop and one for mobile.
    Are you putting the JS code in the right wrapper?
    Did you try to see whether you are getting and JS error in the console?
    Thanks,
    Nico