This is a migrated thread and some comments may be shown as answers.

Link clicking inside a panel bar

4 Answers 342 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 1
Gabriel asked on 25 Dec 2011, 08:01 AM
I have a panel bar with several items inside. Each <li> item has a regular HREF link, which, when clicked, redirects the page as it is supposed too.

Problem is, when I try to override a link using jQuery or just bind a click event to any element within the panel bar, nothing works.

I think I am missing something here. The list item is as follows:
<li><a class="popup" href="gosomehwereelse">click me</a></li>

The jQuery code I have is:
$("a.popup").click(function (e) {
        e.preventDefault();
        // do something...
    });

No matter what I try, it seems impossible to override link clicks when the link is inside a panel bar list...

4 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 26 Dec 2011, 09:17 AM
Hi,

You can bind to the kendo PanelBar select or expand event - see this example for more details. However, it really depends on what you are trying to accomplish by preventing the default event here. Can please provide some more details?

Greetings,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gabriel
Top achievements
Rank 1
answered on 26 Dec 2011, 11:35 PM
I have a PabelBar with every item in it containing a link.

When a link is clicked, the browser follows it. What I'm trying to do is override links that contain the class 'popup'.

Problem is, I can't override them.
0
Petyo
Telerik team
answered on 27 Dec 2011, 09:20 AM
Hello,

I am not sure what the issue may be. Failed reproducing it in the attached example. Is it possible for you to modify it, so that we can exhibit the problem? 

Regards,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sumit
Top achievements
Rank 1
answered on 04 Apr 2012, 09:07 AM
Hello,

I am also facing the same problem with panel bar item.
I am doing POC to move our one of the application to Mobile and this is the first time I am using KendoUI.
I am new to HTML and Jquery.

I have a panel bar which contains multiple items and when I click on any item it should perform some task.
(please see the snapshot for more detail)

Here I want when I click on one of the item lets say "Attendance" it must show the data in grid.
And data must come from DB. (I need to develop a widget)
Please help me how can proceed further.

Thanks in advance,
Sumit Purothi.
Tags
PanelBar
Asked by
Gabriel
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Gabriel
Top achievements
Rank 1
Sumit
Top achievements
Rank 1
Share this question
or