Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Zoho Docs
Google Docs
Each Attachment size should not exceed 1MB.
Max no of attachments : 0
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
New to this Portal?
Click on Join Now to Sign Up
Join Now
Home
All Forums
JavaScript
Move this topic
Forum :
FuncUnit
StealJS
General JavaScriptMVC
DocumentJS
jQueryMX
CanJS
jQuery++
Sub forum :
Move this topic
Cancel
jQueryMX
Controller
asgeo1
Having a static init function in controller prevents the generated jQuery plugin from being created
in
jQueryMX
»
Controller
•
1 year ago
$.Controller.extend('ExampleController', {
// STATIC properties:
init: function(){
}
},{
// PROTOTYPE properties:
});
The ExampleController object/class will exist in the DOM, but no jQuery.fn.example() function will be created.
If you remove the init function it will be fine and jQuery.fn.example() is created.
Am I doing anything wrong or is this a bug?
1
Reply
Replies(2)
asgeo1
Re: Having a static init function in controller prevents the generated jQuery plugin from being created
1 year ago
It's ok, I've worked it out. The base Controller class already has a static init method which sets up the jQuery plugin. So I was effectively overwriting it. I just needed to call this._super()
$.Controller.extend('ExampleController', {
// STATIC properties:
init: function(){
this._super();
}
},{
// PROTOTYPE properties:
});
Justin Me..
Re: Having a static init function in controller prevents the generated jQuery plugin from being created
1 year ago
yeah, btw, you 'typically' want to do :
this._super.apply(this, arguments)
Just in case the super takes any arguments.
Leave a comment on asgeo1's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to asgeo1's problem
Top
Reply
{"z5833104":[32525000000587178,32525000000587196],"z165885":[32525000000591215]}
Statistics
2
Replies
585
Views
0
Followers
Tags
Cancel
plugin
init
static
controller
jquery
Actions
Permalink
Related Posts
Nested Controllers, Problem with Na...
Controller bound multiple times whe...
Getting an error, "raw is unde...
Problem using jQuery tools v1.2.6...
Call Another controller instance fr...
© Bitovi - JavaScriptMVC Training and Support