Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kendo UI Mobile - Can't open external links

Tags:

kendo-ui

How can i open external links using Kendo UI Mobile 2012.3.1114.

<ul data-role="listview">
    <li><a href="tel:1-555-555-5555" data-rel="external">tel:1-555-555-5555</a></li>
    <li><a href="mailto:[email protected]" data-rel="external">mailto:[email protected]</a></li>
    <li><a href="geo:0,0?q=google" data-rel="external">geo:0,0?q=google</a></li>
    <li><a href="http://google.com/" data-rel="external">http://google.com/</a></li>
</ul>

http://jsfiddle.net/macwebdev/uQmcD/

Am i doing something wrong?

like image 574
mac Avatar asked Dec 21 '12 23:12

mac


2 Answers

HTML5 attribute data-rel="external" should work, or use Javascript/jQuery to change url.

Kendo HTML5 Example:

<a href="http://kendoui.com/" data-rel="external">Visit KendoUI</a>

More Info: http://docs.kendoui.com/getting-started/mobile/application#linking-to-external-pages

Javascript/jQuery Example:

$("body").on("click",'a[data-rel="external"]', function(e) {
    e.preventDefault();
    window.open($(this).attr("href"));
});

Example: http://jsfiddle.net/uQmcD/4/

like image 200
David Douglas Avatar answered Nov 11 '22 09:11

David Douglas


Try downloading a newer version of Kendo Mobile. There was a bug which manifested itself in a similar way.

like image 26
Atanas Korchev Avatar answered Nov 11 '22 10:11

Atanas Korchev