jQuery, relative url on IE
I'm trying to generate jQuery vertical tabs using jQuery template. I use this code :
<script type="text/javascript">
$(document).ready(function () {
var clientData = [
{ name: "Rey Bango", age: 42, id: 1, phone: ["954-600-1234", "954-355-5555"] },
{ name: "Mark Goldberg", age: 51, id: 2, phone: ["954-600-1234", "954-355-5555"] },
{ name: "Jen Statford", age: "25", id: 3, phone: ["954-600-1234", "954-355-5555"] }
];
$("#clientTemplate").tmpl(clientData).appendTo($("#vtabs div ul"));
$("#phoneTemplate").tmpl(clientData).appendTo($("#vtabs div:last"));
$("#vtabs").jVertTabs();
});
</script>
<script id="clientTemplate" type="text/html">
<li><a href="#${id}">${name}</a></li>
</script>
<script id="phoneTemplate" type="text/html">
<div id="${id}">
<p>${name} - Age: ${age}</p>
<p>Some text on panel 1</p>
</div>
</script>
Everything works greate on Firefox, Chrome, Opera and Safari but in IE this code doesn't work. When I looked at the html source I saw that in IE instead of
<li><a href="#1">${name}</a></li>
<li><a href="#2">${name}</a></li>
<li><a href="#3">${name}</a></li>
I get
<li><a href="http://localhost:51592/galeria-lista/#1">${name}</a></li>
<li><a href="http://localhost:51592/galeria-lista/#2">${name}</a></li>
<li><a href="http://localhost:51592/galeria-lista/#3">${name}</a></li>
Because of this the jQuery vertical tabs don't work in IE.
Please开发者_如何学Python help me.
maybe some conflict with JQuery $ try use JQuery instead $
精彩评论