Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

Uncaught TypeError: e.reframe is not a function #12

Closed
mohandere opened this issue Oct 6, 2016 · 5 comments
Closed

Uncaught TypeError: e.reframe is not a function #12

mohandere opened this issue Oct 6, 2016 · 5 comments

Comments

@mohandere
Copy link
Contributor

Hi

There is an issue with $ shorthand function.

window.$ is undefined in my case, instead window.jQuery works for me.

To fix this issue i did changed plugin code from,

if (window.$) {
     window.$.fn.extend({
       reframe: function reframeFunc(cName) {
         return reframe(this, cName);
      }
  });
}

To

if (window.jQuery) {
     window.jQuery.fn.extend({
       reframe: function reframeFunc(cName) {
         return reframe(this, cName);
      }
  });
}
@yowainwright
Copy link
Contributor

yowainwright commented Oct 7, 2016

Why not just use, reframe(el) & use plain javascript? I'm just curious.

@mohandere
Copy link
Contributor Author

mohandere commented Oct 7, 2016

Thats right @yowainwright but Its not handy to write javascript selector so prefer jQuery way.

@yowainwright
Copy link
Contributor

yowainwright commented Oct 11, 2016

@mohandere you can write the selector the same way b/c the javascript using document.querySelectorAll.

https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll

@yowainwright
Copy link
Contributor

@mohandere thanks again for your notes & time. V0.3.2 should work better for the use case you pointed out. 👌

@yowainwright
Copy link
Contributor

@mohandere good catch on the zepto vs Zepto. I'm going to update that soon - next day or so. ~THANKS 🙏

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

No branches or pull requests

2 participants