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

Using theme selector from examples in project

3 Answers 72 Views
Documentation and tutorials
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jfkrueger
Top achievements
Rank 1
jfkrueger asked on 05 Jun 2012, 04:31 PM
I have the theme selector from the examples working great in one project, but now I am trying to start a new project and use it but am running into trouble. For some reason in the telerik.examples.min.js script, at the very top is this:

$(function () {
    var $t = $.telerik;
    var fx = $t.fx.slide.defaults();

but $t is always being set to undefined which causes the following error:

Unable to get value of the property 'fx': object is null or undefined

What am I missing? Perhaps it would help if I knew what this line of code is trying to accomplish:

var $t = $.telerik;

I am new to jquery so that assignment isn't making any sense to me, what is it trying to do?

Thanks!!







3 Answers, 1 is accepted

Sort by
0
jfkrueger
Top achievements
Rank 1
answered on 05 Jun 2012, 05:04 PM
Is it expecting the namespace of my project to start with "Telerik"? I started a new project and named it Telerik.... (Something) and now it does not throw this error.

I would love to understand what is going on here.

Thanks in advance!
0
Accepted
Dimo
Telerik team
answered on 06 Jun 2012, 08:16 AM
Hi Joe,

$.telerik is defined in telerik.common.js. This is a namespace in which some commonly used methods are defined, for example ones related to

- component client instance creatiion
- event binding and handling
- DOM and string manipulation
- cultures

If you need the code that you have included above, it should appear after telerik.common.js is registered.

Greetings,
Dimo
the Telerik team
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
jfkrueger
Top achievements
Rank 1
answered on 06 Jun 2012, 02:21 PM
Ahhh ha, that makes sense.

Thank you!
Tags
Documentation and tutorials
Asked by
jfkrueger
Top achievements
Rank 1
Answers by
jfkrueger
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or