Comments (4)
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.
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.
Issue 9 has been merged into this issue.
Original comment by [email protected]
on 18 Jan 2011 at 1:57
from mobile-bookmark-bubble.
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)
- Bubble keeps popping up even after I add the bookmark?? HOT 2
- should not display if in-app web viewer
- Android version of Bookmark Bubble HOT 5
- jquery mobile tap events not working to close bubble HOT 1
- popup not appearing
- Will cause the homepage to swipe to page 2 when used with jquery HOT 2
- Patch for /bookmark_bubble.js
- Patch for /example/example.js
- Patch for /example/example.js
- Patch for /example/example.js
- Tiny bubble
- not working with google closure compiler
- Patch for /bookmark_bubble.js
- Book mark bubble is shows after it add to the home screen HOT 1
- Patch for /images/generate_base64_images HOT 1
- Arrow will be not displayed correctly HOT 1
- ios 7 compatability HOT 2
- Chrome Mobile - Mobile Bookmarking
- Default language should be English
- Create shortcut
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobile-bookmark-bubble.