javascript - When Working with Jquery Mobile, HTML A HREF Keeps adding # and base url -


ok,

i'm @ wit's end here. i've read questions around anchor tags, base url's , usage of / in href. yet no matter do, still seem anchor tag , base url added link.

example below: when hover on link, shows http://www.localhost:8080/view/login.php when click on href tag below http://www.localhost:8080/view/register.php#/view/login.php

html :

<!doctype html> <html lang="en">     <head>         <meta charset="utf-8">         <meta name="viewport" content="width=device-width, initial-scale=1">         <title>food loginator</title>         <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css">         <link href="../css/main.css" rel="stylesheet" type="text/css">         <script src="http://code.jquery.com/jquery-1.8.3.min.js" type="text/javascript"></script>         <script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>         <script src="../javascript/gen_validatorv4.js" type="text/javascript"></script>         <script src="../javascript/pwdwidget.js" type="text/javascript"></script>     </head> <body> <div data-role="page" id="home">     <header data-role="header">         <h1>food loginator</h1>         <div data-role="navbar">             <ul>                 <li><a href="http://www.localhost:8080/index.php" data-icon="home" data-theme="b" >home</a></li>                 <li><a href="http://www.localhost:8080/view/login.php" data-icon="star" data-theme="b" >login</a></li>                 <li><a href="http://www.localhost:8080/view/register.php" data-icon="grid" data-theme="b" class="ui-btn-active">register</a></li>             </ul>         </div> </header> 

any ideas appreciated.

it seems default part of jquery mobile functionality. apparently, jquery ajax call object #tag in tag. dynamically add's object dom. in order remove had add rel="external" tags.

https://demos.jquerymobile.com/1.2.0/docs/pages/page-links.html


Comments