Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom variable name #12

Closed
Molkobain opened this issue Nov 16, 2013 · 6 comments
Closed

Custom variable name #12

Molkobain opened this issue Nov 16, 2013 · 6 comments

Comments

@Molkobain
Copy link

Hi,

I'm just starting with your plugin so I can't really make a feedback now, but for what I've saw, it would be nice to be able to choose our own variable name and not the mandatory "fm".

Some might already have that somewhere or just want to name it properly regarding their naming convention.

Thanks !

@vedmack
Copy link
Owner

vedmack commented Nov 16, 2013

Hi, and welcome aboard, the "fm" is the name of the module of the feedback_me plugin, its hard-coded , take a look at this line: var fm = (function () { , till now one have complained about collision with other plugin, and anyway its really easy to change it into something else , all you have to do is the replace all occurrences of the fm. in the jquery.feedback_me.js file with some other name (like feedback_me.) and of course replace the "fm" in the following line "var fm = (function () {" too. Anyway if in the future enough users will complain about collision with other plugin I will consider changing it, about making it dynamic, I don't know about such way and don't think that it will be a good idea.

@vedmack vedmack closed this as completed Nov 16, 2013
@Molkobain
Copy link
Author

Yes I know we can change the variable name inside the js file, but usually your don't want to make any change to the plug in files as they can be modified by futher updates and therefore override your previous changes.

That's why I would recommend a flexible variable name.

@vedmack
Copy link
Owner

vedmack commented Nov 17, 2013

You are right about changing other plugin is a not a good idea, but frankly I never seen that plugin allows you to control its name. So as long as its not doing any conflicts with other plugin I will keep it short and simple "fm" :)

@Molkobain
Copy link
Author

Actually it's doing conflict with JQuery, the whole library ins't working when I init feedback_me. The thing is that it's happening only in IE (7, 8, 9).

SCRIPT16389: Unspecified error.
jquery-1.10.2.min_1.js, Line 5 Character 19989

I'm gonna try to rename the fm variable to see if it changes anything. Did you encountered something like this ?

@vedmack
Copy link
Owner

vedmack commented Nov 17, 2013

Ok , found the problem, was comparing jquery version in order to find out if I should use "on" or "delegate" the thing is that 1.7 > 1.10.2 while the version of the 1.10.2 is actually a more recent one so the check was wrong... it has nothing to do with the fm name of the plugin... fixing...

@Molkobain
Copy link
Author

Cool !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants