GithubHelp home page GithubHelp logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 28, 2024
jQuery mobile's usage of location.hash for page addressing, history, navigation:

http://jquerymobile.com/demos/1.0a2/#docs/pages/docs-navmodel.html

Original comment by jason.p.morrison on 20 Dec 2010 at 10:58

from mobile-bookmark-bubble.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 28, 2024
Sorry for the late response -- I've been away on holidays for the past couple 
weeks.

The idea behind using a hash parameter is that it will persist in the URL 
across browser reloads and will be saved with any bookmark the user creates. 
This lets you do things like:
a) detect when the user has bookmarked your app after seeing the bubble, so you 
can track the effectiveness of the promo
b) avoid showing the bubble if the user has already seen it

There's a risk of a poor user experience if you just use a local variable: if 
the user bookmarks your application and then comes back later by tapping on the 
bookmark, they may see the bubble again, prompting them to bookmark your 
application -- but they've already done that.

I've pushed a documentation update noting that this conflicts with jQuery 
Mobile.

Original comment by [email protected] on 4 Jan 2011 at 5:46

  • Changed state: Done

from mobile-bookmark-bubble.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 28, 2024
Issue 9 has been merged into this issue.

Original comment by [email protected] on 18 Jan 2011 at 1:57

from mobile-bookmark-bubble.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 28, 2024
As a workaround, I use the HTML5 history object to adjust the URL without a 
page refresh, and without using the hash tag.  This seems to work for me.  See 
below for code:

var parameter = 'bmb=1';

bubble.hasHashParameter = function () {
  return window.location.search.indexOf(parameter) != -1;
};

bubble.setHashParameter = function () {
  if (!this.hasHashParameter()) {
    if (window.location.search.indexOf('?') == -1) {
      window.history.replaceState('Object', 'Title', window.location + '?' + parameter);
    } else {
      window.history.replaceState('Object', 'Title', window.location + '&' + parameter);
    }
  }
};

Original comment by [email protected] on 28 Jul 2012 at 3:41

from mobile-bookmark-bubble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.