javascript - "Illegal character" in the jQuery library file, even without an invisible character or a missing quote anywhere -


what i'm trying do

i'm programming currency converter, , not have manually update current currency, current value website trough ajax , whatever origin (to allow access domain). tested in separated page , worked perfectly, i.e. showed current currency. however, when inserted in actual code of converter ...

the error

... console accuses illegal character inside jquery file, if link google's library:

syntaxerror: illegal character            jquery.min.js:1:4   referenceerror: $ not defined          converter.html:75:0 

wherever put (in beginning, middle or end), same error happens, if insert code there, if link jquery file, no errors showed.

the code

$.getjson('http://whateverorigin.org/get?url=' +      encodeuricomponent('http://usd.fx-exchange.com/brl/') + '&callback=?',     function (data) {         currency = $('.today_s', data.contents).html();         currency = currency.match(/\d\.\d\d\d\d/); }); 

the page i'm trying move to: here.

the working test page: here.


i don't have clue of happening..

after many tweaks, got rid of error! did:

first moved contents of actual page test page. moved script separated .js file. error accused "illegal character" arithmetic symbols (/ , *) in functions in beginning of file. moved them end. moved jquery code beginning of .js file. got free! =d

i don't know real error, things know wasn't "illegal character", , doing did fixed that.

by way, attention tried help, though.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -