user2156292
user2156292

Reputation: 1

'#' symbol in Kendo UI

is there any other way to do screen navigation without having '#' symbol in the codes? For example:below code there is a '#'

a href="#bar" data-role="button"

The '#' is causing termination error in my program.

Thank you.

Upvotes: 0

Views: 372

Answers (2)

Gaj
Gaj

Reputation: 31

Actually, you can safely use '#' following their document

If your template includes a "#" that is not part of a binding expression, you must escape that value or it will cause a template compliation error (this is common in Kendo UI Mobile where # is often used for view navigation). You can escape any literal "#" in JavaScript strings using "\\#" and in HTML script templates using "\#".

http://docs.kendoui.com/getting-started/framework/templates/overview

Upvotes: 1

Seth McClaine
Seth McClaine

Reputation: 10040

I'm assuming you're referring to this:

<a href="#">click here</a>

If so you can do this, but it throws errors in some browser (old version of ie)

<a href="javascript:void(0)">click here</a>

Further you could throw a link in there and prevent it with jquery

<a href="www.aol.com">click here</a>

JQuery

$('a').onClick(function(e){
 e.stoppropagation();
 e.preventDefault();
});

Upvotes: 0

Related Questions