Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8347039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:13:31+00:00 2026-06-09T07:13:31+00:00

I am developing mobile browser app using html5 and jquery mobile. I have a

  • 0

I am developing mobile browser app using html5 and jquery mobile. I have a small question. I Need to Display ads on top of Header(Browser(AD, Header, Content, and Footer)) in mobile browser. When it scrolls, the header should stay fixed at the top and the ads and the content body should scroll.

Any Suggestion Any idea?

Thank You

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:13:37+00:00Added an answer on June 9, 2026 at 7:13 am

    Thank you for your support. For those who are looking for answers. I got something working now. On Mobile. It works well both on Android and iPhone.

    What i am doing here is. OnScroll i am looking for the height 10. When it reaches 10 then the header(sticky-header) will be on the top of the screen (like position:fixed) and when the page reaches the top (0 px) The ad will be placed in the top and the header will be moved 48px down.

    window.onscroll=function (){
           if (window.innerHeight > window.innerWidth) {
            var value = $(this).scrollTop();
            if ( value > 10 ) {
                    //$("#sticky-header").fixedtoolbar({ visibleOnPageShow: false });
                $("#sticky-header").fixedtoolbar({ tapToggle: false }).css("top","0px");
                $("#ad1").hide();
                }
            else if(value < 10){
                $("#ad1").show();
                $("#ad1").fixedtoolbar({ tapToggle: false }).css("top","0px");
                $("#sticky-header").fixedtoolbar({ tapToggle: false }).css("top","48px");
            }
           }
    
            if (window.innerWidth > window.innerHeight) {
            $("#sticky-header").fixedtoolbar({ tapToggle: false }).css("top","0px");
            }
    
    
        }
    

    Thank You

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a browser-based mobile app built on top of jQuery Mobile, and some
I am developing the application using jQuery Mobile 4.1. In my app, I have
I have made a set of HTML5 pages using Jquery mobile. While developing I
I'm developing a native mobile app for Android and iOS using PhoneGap.I have a
I'm developing an app using jquery mobile, phonegap and openDatabase. When the app is
I am developing a mobile web app. Currently I have this snippet of jQuery
I'm developing a room booking application in the browser using JQuery-Mobile. Initially I had
I am using Jquery Mobile framework for developing cross-browser Application. I am also planning
I want to look into developing mobile applications using HTML5. I'm very new to
I am developing a mobile app using j2me. It works fine in sony ericsson

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.