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

JQuery find all panels on page

3 Answers 91 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 1
Gabriel asked on 19 Jun 2013, 12:57 AM

Hi, I am trying to loop through all my panelsbars in JS but it does not work, when I try to getelementbyid then i can find the panel bat but not like this:
any ideas?

$('div[id*="P010101"]').each(function () {
    alert('a');
});

Thank you.

3 Answers, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 19 Jun 2013, 08:10 AM
Hello Gabriel,

Please refer to the bottom of the Client-Side Basics help article where you can find an example of how this can be implemented with the RadPanelBar control. 

Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Gabriel
Top achievements
Rank 1
answered on 19 Jun 2013, 04:51 PM

The example you have are for regular $find method, I would like to loop through all the panelbars on my page performing some updates, i tried to use this code but with no success:

$('div[id*="P01"]').each(function () {
    alert('a');
});


Any one tried this before?

Thanks.
0
Gabriel
Top achievements
Rank 1
answered on 19 Jun 2013, 10:52 PM


I have found the answer,

it seems the page renders fully only after a period of time.

It works when I put my code in a function I called InitCountNumbers().
after declaring the final load sequence with:

Sys.Application.add_load(InitCountNumbers);


Thank you.
Tags
PanelBar
Asked by
Gabriel
Top achievements
Rank 1
Answers by
Kate
Telerik team
Gabriel
Top achievements
Rank 1
Share this question
or