0

I have two pages. 1> "index.html" and another is "events.html."
the code of "index.html" is like this:

<body>
<a href="events.html#div2" data-role="button">Click me</a>
</body>

the code of 'events.html' is:

<body>
<div id="div1">abcd</div>
<div id="div2">xyz</div>
</body>

So, when I click on index.html page it should go to the "div2" part of "events.html" page. But, in real nothing is happening.

Now my question is how to link with a <div> part of "events.html" from "index.html" in jquery mobile.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Sandy
  • 11
  • 1
  • hope this can help... http://stackoverflow.com/questions/9652944/jquery-scroll-to-id-from-different-page – Banik Mar 02 '16 at 07:41
  • By your question do you mean it _does_ work if you disable JavaScript and just let HTML do its thing? (I.e. that jQuery Mobile is somehow disturbing the normal flow?) Otherwise, if "nothing is happening" means it displays events.html without scrolling to div2, then the question becomes, how long is the page events.html? Does it even have a scrollbar? – Mr Lister Mar 07 '16 at 10:50

0 Answers0