javascript - Replacing JQuery DOM object with a function parameter -


I create a jack object that HTML will get with the GJSON method, and I would like to call different methods on that jQuery object. Recover DOM Elements The methods I use will be different depending on the source of the HTML. I tried to build method chains in advance of an object, of var and passed that object and thought in the Formor DOM object function, that the empty dom object will be replaced by the DOM object, which is a function parameter Not happening because VertChat resolves an empty string with length = 0 in the function. I'm quite new to JS and JQ, so I'm probably far away from it.

  var x = $ (); ("P: Eq (1) '). Text ()," Chain 2 ": x.filter (' Children ('P: eq (5)'). Text ()," Series 3 ": X. Filters ( ('P: eq (9)'). Text ()} $ .getJSON ('http://whateverorigin.org/get?url=' + encodeurIC component (' Url) + 'and callback =?', Function (data) {X = $ (data.contents); thisfood.kcal = test (x, k);}) function test (x, k) {var product = x. Filter '(' div '). (' # Top ') .children (' h1 ') text ();; var y = x.filter (' div '). (' # Feeding '). : Eq (1) '). Text (); var y = k.chain1; var kcal_kg = y.match ("\\ d {1} \\, \\ d {3}"); var kcal_serve = Y.match ("\\ s \\ d {3}"); var arr = new array (kcal_kg, kcal_serve, product); return arr;}  

I really hate Jquery, your code looks like you are eager to publish your project with Jquery last Anyway ... if you want to change the jquery selector $ ("") with the function, then you should know that the function requires that it be a DOM Returning the element otherwise an error will be flagged and the Javascript will be with Ebert.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -