javascript - Migrating from jQuery to Zepto - $.data() - Uncaught TypeError: undefined is not a function -


I have some javascript that ends with:

  $ Fn.flips1 = function (option) {if (option type === 'string') {var args = Array.prototype.slice.call (logic, 1); (Unit (function () {var example = $ .data (this, 'flip1'); if (! Exemplar) {log arroker ("can not call methods on flips1, call method" before initiating Trying to "option" + "); return;} if (! $ Function (example [options]). Options.charAt (0) ===" _ ") {log error (" no such method "" + Option + "'flips1 for example'); return;} example [option] .apply (example, args);})}} other {it} .ch (function () {var example = $ .data (this, Flip 1 '); if (! Example) {$ .data (this,' flips1 ', New $. (Options, this));}});} It returns back;}  

The code works fine with jQuery Zepto port (Zepto data included from the builder. After using a custom build with the js module) I keep the "Uncaught TypeError: Undefined No Function" to get the $$ line related data Var example = $ .data (this, 'flips1 '); and in the statement.

After looking around, there are so many realistic evidence that Zepto' isolated Works c ', but there is no suggestion to learn about the issues.

Can someone suggest how Zepto should be used?


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -