I’m trying to get html code from a different site via jquery and convert it to html object. This is my code.
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
$.getJSON('http://www.whateverorigin.org/get?url=' + encodeURIComponent('https://www.codewars.com/users/codemzy') + '&callback=?', function (data) {
console.log(data.contents);
string s = data.contents;
var htmlObject = $(s);
alert(htmlObject.querySelector('.has-tip').src);
});
</script>
</head>
<body>
</body>
</html>
Here I need to get image src from url ‘https://www.codewars.com/users/codemzy‘ But unfortunately getting this error instead,
SyntaxError: unexpected token: identifier
I changed string s
to var s
issue is gone but now getting this issue,
TypeError: htmlObject.querySelector is not a function
I get this inside my console log,
<!DOCTYPE html><html><head>
<script>window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","errorBeacon":"bam.nr-data.net","licenseKey":"364dba19a3","applicationID":"15446117","transactionName":"Jg5ZQEdYXQ1XRRZAQQATRBtGX14W","queueTime":0,"applicationTime":72,"agent":""}</script>
<script>window.NREUM||(NREUM={}),__nr_require=function(e,n,t){function r(t){if(!n[t]){var o=n[t]={exports:{}};e[t][0].call(o.exports,function(n){var o=e[t][1][n];return r(o||n)},o,o.exports)}return n[t].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<t.length;o++)r(t[o]);return r}({1:[function(e,n,t){function r(){}function o(e,n,t){return function(){return i(e,[c.now()].concat(u(arguments)),n?null:this,t),n?void 0:this}}var i=e("handle"),a=e(3),u=e(4),f=e("ee").get("tracer"),c=e("loader"),s=NREUM;"undefined"==typeof window.newrelic&&(newrelic=s);var p=["setPageViewName","setCustomAttribute","setErrorHandler","finished","addToTrace","inlineHit","addRelease"],d="api-",l=d+"ixn-";a(p,function(e,n){s[n]=o(d+n,!0,"api")}),s.addPageAction=o(d+"addPageAction",!0),s.setCurrentRouteName=o(d+"routeName",!0),n.exports=newrelic,s.interaction=function(){return(new r).get()};var m=r.prototype={createTracer:function(e,n){var t={},r=this,o="function"==typeof n;return i(l+"tracer",[c.now(),e,t],r),function(){if(f.emit((o?"":"no-")+"fn-start",[c.now(),r,o],t),o)try{return n.apply(this,arguments)}catch(e){throw f.emit("fn-err",[arguments,this,e],t),e}finally{f.emit("fn-end",[c.now()],t)}}}};a("actionText,setName,setAttribute,save,ignore,onEnd,getContext,end,get".split(","),function(e,n){m[n]=o(l+n)}),newrelic.noticeError=function(e,n){"string"==typeof e&&(e=new Error(e)),i("err",[e,c.now(),!1,n])}},{}],2:[function(e,n,t){function r(e,n){if(!o)return!1;if(e!==o)return!1;if(!n)return!0;if(!i)return!1;for(var t=i.split("."),r=n.split("."),a=0;a<r.length;a++)if(r[a]!==t[a])return!1;return!0}var o=null,i=null,a=/Version/(S+)s+Safari/;if(navigator.userAgent){var u=navigator.userAgent,f=u.match(a);f&&u.indexOf("Chrome")===-1&&u.indexOf("Chromium")===-1&&(o="Safari",i=f[1])}n.exports={agent:o,version:i,match:r}},{}],3:[function(e,n,t){function r(e,n){var t=[],r="",i=0;for(r in e)o.call(e,r)&&(t[i]=n(r,e[r]),i+=1);return t}var o=Object.prototype.hasOwnProperty;n.exports=r},{}],4:[function(e,n,t){function r(e,n,t){n||(n=0),"undefined"==typeof t&&(t=e?e.length:0);for(var r=-1,o=t-n||0,i=Array(o<0?0:o);++r<o;)i[r]=e[n+r];return i}n.exports=r},{}],5:[function(e,n,t){n.exports={exists:"undefined"!=typeof window.performance&&window.performance.timing&&"undefined"!=typeof window.performance.timing.navigationStart}},{}],ee:[function(e,n,t){function r(){}function o(e){function n(e){return e&&e instanceof r?e:e?f(e,u,i):i()}function t(t,r,o,i){if(!d.aborted||i){e&&e(t,r,o);for(var a=n(o),u=v(t),f=u.length,c=0;c<f;c++)u[c].apply(a,r);var p=s[y[t]];return p&&p.push([b,t,r,a]),a}}function l(e,n){h[e]=v(e).concat(n)}function m(e,n){var t=h[e];if(t)for(var r=0;r<t.length;r++)t[r]===n&&t.splice(r,1)}function v(e){return h[e]||[]}function g(e){return p[e]=p[e]||o(t)}function w(e,n){c(e,function(e,t){n=n||"feature",y[t]=n,n in s||(s[n]=[])})}var h={},y={},b={on:l,addEventListener:l,removeEventListener:m,emit:t,get:g,listeners:v,context:n,buffer:w,abort:a,aborted:!1};return b}function i(){return new r}function a(){(s.api||s.feature)&&(d.aborted=!0,s=d.backlog={})}var u="nr@context",f=e("gos"),c=e(3),s={},p={},d=n.exports=o();d.backlog=s},{}],gos:[function(e,n,t){function r(e,n,t){if(o.call(e,n))return e[n];var r=t();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(e,n,{value:r,writable:!0,enumerable:!1}),r}catch(i){}return e[n]=r,r}var o=Object.prototype.hasOwnProperty;n.exports=r},{}],handle:[function(e,n,t){function r(e,n,t,r){o.buffer([e],r),o.emit(e,n,t)}var o=e("ee").get("handle");n.exports=r,r.ee=o},{}],id:[function(e,n,t){function r(e){var n=typeof e;return!e||"object"!==n&&"function"!==n?-1:e===window?0:a(e,i,function(){return o++})}var o=1,i="nr@id",a=e("gos");n.exports=r},{}],loader:[function(e,n,t){function r(){if(!E++){var e=x.info=NREUM.info,n=l.getElementsByTagName("script")[0];if(setTimeout(s.abort,3e4),!(e&&e.licenseKey&&e.applicationID&&n))return s.abort();c(y,function(n,t){e[n]||(e[n]=t)}),f("mark",["onload",a()+x.offset],null,"api");var t=l.createElement("script");t.src="https://"+e.agent,n.parentNode.insertBefore(t,n)}}function o(){"complete"===l.readyState&&i()}function i(){f("mark",["domContent",a()+x.offset],null,"api")}function a(){return O.exists&&performance.now?Math.round(performance.now()):(u=Math.max((new Date).getTime(),u))-x.offset}var u=(new Date).getTime(),f=e("handle"),c=e(3),s=e("ee"),p=e(2),d=window,l=d.document,m="addEventListener",v="attachEvent",g=d.XMLHttpRequest,w=g&&g.prototype;NREUM.o={ST:setTimeout,SI:d.setImmediate,CT:clearTimeout,XHR:g,REQ:d.Request,EV:d.Event,PR:d.Promise,MO:d.MutationObserver};var h=""+location,y={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",agent:"js-agent.newrelic.com/nr-1130.min.js"},b=g&&w&&w[m]&&!/CriOS/.test(navigator.userAgent),x=n.exports={offset:u,now:a,origin:h,features:{},xhrWrappable:b,userAgent:p};e(1),l[m]?(l[m]("DOMContentLoaded",i,!1),d[m]("load",r,!1)):(l[v]("onreadystatechange",o),d[v]("onload",r)),f("mark",["firstbyte",u],null,"api");var E=0,O=e(5)},{}]},{},["loader"]);</script><title>codemzy | Codewars</title><meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="B4V3zghT9uBR/L1tD0i1oHfe8UXmlsXOF4frz88KfW1jS+m1pJ87yrkrwOH7937dEwGYwC6SIl5gIEGTyyjNnQ==" /><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" /><meta property="og:title" /><meta content="website" property="og:type" /><meta content="Codewars" property="og:site_name" /><meta content="http://www.codewars.com" property="og:url" /><meta content="http://www.codewars.com/assets/logos/logo-square-paper-bg.jpg" property="og:image" /><meta content="https://www.codewars.com/assets/logos/logo-square-paper-bg.jpg" property="og:image:secure_url" /><meta content="Codewars is where developers achieve code mastery through challenge. Train on kata in the dojo and reach your highest potential." property="og:description" /><meta content="652826666" property="fb:admins" /><meta content="110951985735625" property="fb:app_id" /><meta content="Codewars is where developers achieve code mastery through challenge. Train on kata in the dojo and reach your highest potential." name="description" /><meta content="codewars, code kata, kata, code gym, coding, code practice, ruby, javascript, coffeescript, web development, software development, dojo" name="keywords" /><meta content="EMv3k6eCCUuSkbwJpGlLbtsBd_lCvmvDp1Ucsv0rIvM" name="google-site-verification" /><link rel="stylesheet" media="screen" href="//fonts.googleapis.com/css?family=Lato" /><link rel="stylesheet" media="screen" href="/assets/application-3ca6123ec21367a87bc2ea58289c722059fe6a5dc5889873be3e43a800fc8890.css" /><script src="/assets/modernizr-230f807f7cc30c811ed349dddaae3ae4b55028724e05e77b779ce6e83a57da13.js"></script><script src="//cdn.ably.io/lib/ably.min-0.8.js"></script><script>window.ablyKey = "scNMAQ.WPB3NQ:wcqqMD8xujGV8lHt"
window.pjaxReady = function(cb){
if(window.App){
App.ready(cb);
}
else{
cb()
}
}</script></head><body class="show_view loading responsive dark-theme" id="users"><div id="app"><div class="twelve columns" id="shell"><div class="sidenav-nubbin"><i class="icon-moon-list "></i></div><nav id="sidenav"><ul class="top"><li class="nav-home"><a class="js-ignore-pjax" href="https://www.codewars.com/"><div class="logo-item-glyph-spin"><div class="spin"><b></b></div></div><span class="mts">Sign Up</span></a></li><li class="nav-catalog"><a href="/kata/latest"><i class="icon-moon-compare "></i><span>Kata</span></a></li><li class="nav-kumite"><a href="/kumite"><i class="icon-moon-forked "></i><span>Kumite</span></a></li><li class="nav-forum"><a href="/topics"><i class="icon-moon-forum "></i><span>Forum</span></a></li><li class="nav-docs"><a href="https://github.com/codewars/codewars.com/wiki" target="wiki" title="Wiki"><i class="icon-moon-document "></i><span>Wiki</span></a></li></ul><ul class="bottom"><li class="nav-leaders"><a href="/users/leaderboard" title="Leaders"><i class="icon-moon-trophy "></i><span>Leaders</span></a></li></ul></nav><header class="main is-visible" id="main_header"><ul class="items"><li><span><a class="js-ignore-pjax is-nudged-down-more" href="/users/sign_in">Log In</a></span></li><li><span><a class="js-ignore-pjax btn is-red" href="/">Sign Up</a></span></li></ul></header><main id="shell_content" role="main"><div class="is-hidden" id="global_alerts"><div class="alert-box"></div></div><div id="flash"></div><div class="row phn"><section class="user-profile mbn"><div class="twelve columns phn"><figure class="profile-pic hide-for-small"><a href="/users/codemzy"><img title="codemzy" class=" has-tip" src="https://avatars1.githubusercontent.com/u/13764272?v=3" alt="13764272?v=3" /></a></figure><figcaption><a href="/users/codemzy"><img src="/users/codemzy/badges/large?logo=false" /></a><div class="flex-box"><div class="stat-box"><div class="stat"><b>Name:</b>Codemzy</div><div class="stat"><b>Clan:</b>Unknown</div></div><div class="stat-box"><div class="stat"><b>Member Since:</b>Sep 2015</div><div class="stat"><b>Last Seen:</b>Jun 2017</div><div class="stat"><b>Profiles:</b><ul class="is-inline"><li class="mrx"><a href="https://github.com/codemzy" target="_blank"><i class="icon-moon-github "></i></a></li><li class="mrx"><a href="https://www.twitter.com/codemzy" target="_blank"><i class="icon-moon-twitter "></i></a></li></ul></div></div><div class="stat-box"><div class="stat"><b>Following:</b>0</div><div class="stat"><b>Followers:</b>3</div><div class="stat"><b>Allies:</b>0</div></div><div class="flex-buttons mtm"><div class="flex-button"><a class="btn is-dark is-tiny" href="/users/codemzy/badges">View Profile Badges</a></div></div></div><div class="clear"></div></figcaption></div></section></div><div class="clear"></div><div class="row mtm"><div class="columns six"><div class="panel marketing is-lightened-purple ad-size"><figure><i class="icon-moon-share "></i></figure><figcaption><h5 class="is-white-text mbn">Earn extra honor and gain new allies!</h5><div>Honor is earned for each new codewarrior who joins.</div><a class="btn is-dark mtm" id="tell_me_more_referrals">Learn more</a></figcaption></div></div><div class="six columns is-low-light phn"><div class="pas" id="_carbonad" style="min-height: 100px"><script async="" id="_carbonads_js" src="//cdn.carbonads.com/carbon.js?serve=CKYILK3L&placement=codewarscom" type="text/javascript"></script><div class="clear"></div></div></div><div class="clear"></div></div><div class="row is-flush is-darkened pam mtm"><div class="tabs"><dl class="tabs"><dd class="is-active"><a href="/users/codemzy/stats">Stats</a></dd><dd><a href="/users/codemzy/completed">Kata</a></dd><dd><a href="/users/codemzy/authored_collections">Collections</a></dd><dd><a href="/users/codemzy/published_kumite">Kumite</a></dd><dd><a href="/users/codemzy/following">Social</a></dd><dd><a href="/users/codemzy/comments">Discourse</a></dd></dl></div><div class="row nmtm"><div class="twelve columns phn"><section class="stat-category"><figure><i class="icon-moon-progress "></i></figure><div class="stat-container"><h2>Progress</h2><div class="stat-row"><div class="stat-box"><div class="stat"><b>Rank:</b>5 kyu</div><div class="stat"><b>Honor:</b>530</div><div class="stat"><b>Leaderboard Position:</b>#26,339</div><div class="stat"><b>Honor Percentile:</b>Top 11.68%</div><div class="stat"><b>Total Completed Kata:</b>61</div></div><div class="stat-box"><h3><i class="icon-moon-terminal "></i>Languages:</h3><div class="mll"><div class="stat"><b>Total Languages Trained:</b>1</div><div class="stat"><b>Highest Trained:</b>JavaScript (5 kyu)</div><div class="stat"><b>Most Recent:</b>JavaScript</div></div></div></div></div><div class="clear"></div></section></div></div><div class="row"><div class="twelve columns phn"><section class="stat-category"><figure><i class="icon-moon-contribution "></i></figure><div class="stat-container"><h2>Contributions</h2><div class="stat-row"><div class="stat-box"><h3><i class="icon-moon-users "></i>Community:</h3><div class="mll"><div class="stat"><b>Comments:</b>3 (4 replies)</div><div class="stat"><b>Collections:</b>0</div><div class="stat"><b>Kumite:</b>0</div><div class="stat"><b>Translations:</b>0 (0 approved)</div></div></div></div></div><div class="clear"></div></section></div></div></div></main><div class="clear"></div></div><div class="clear"></div><footer id="main_footer"><ul class="link-list is-inline"><li class="copyRight is-gray-text">© 2019 Codewars</li><li><a href="/about">About</a></li><li><a href="http://dev.codewars.com" target="API">API</a></li><li><a href="https://medium.com/@Codewars" target="Blog">Blog</a></li><li><a href="/about/privacy">Privacy</a></li><li><a href="/about/terms-of-service">Terms</a></li><li><a data-content="[email protected]" href="mailto:[email protected]" id="contactUs" rel="popover">Contact</a></li><li class="poweredby_link"><a class="has-tip tip-top is-nudged-down-next" href="http://www.qualified.io?utm_source=codewars&utm_medium=web&utm_term=footer" target="Qualified" title="Supercharge your technical hiring with developer assessments."><img style="height: 16px" src="/assets/poweredby_qualified-1238a0410709dd7f80a408e4f6a6b9c4ab7ad838824d3cd42f66f1b6a28e2001.png" alt="Poweredby qualified" /></a></li></ul></footer><div class="modal hide" id="confirm_modal"><div class="modal-header"><div class="close" data-dismiss="modal"><i class="icon-moon-cross large"></i></div><h4>Confirm</h4><div class="clear"></div></div><div class="clear"></div><div class="modal-body view"></div><div class="modal-footer"><ul class="form-actions"><li class="cancel dark" data-dismiss="modal"><a class="btn">Cancel</a></li><li class="alt-confirm is-hidden"><a class="btn"></a></li><li class="confirm"><a class="btn is-green"><i class="icon-general-checkmark"></i>Confirm</a></li></ul></div></div><div class="is-hidden" id="templates"></div></div><script src="/assets/application-d6ef89cc4f2fa857023e8b6b7d4894666ef841889a0f4f712d83d54354bd138b.js"></script><script>App.currentUser = {}
if (window.App && App.currentUser && App.currentUser.hideAds) $('#_carbonad').hide()</script><script>App.session = {"private_channel_name":"KSweWA","env":"production"}
App.data = {"routes":{},"controllerName":"users","profile":{"username":"codemzy","name":"Codemzy","clan":"","isSelf":false}}
App.routes = {"toggle_relationship":"/toggle/55e5703e05dfb5debe00004c","collection":"/api/v1/collections/%7Bid%7D"}</script><script src="/assets/raphael-593118fb643ca7d9e80e0b705f5e53d0540542e5d810d61a4d7e50e79081b614.js"></script><script src="/assets/bundles/users-60e799441310588f3c8f63195335ae9c3bc27ce9865895e6ee61f918650c1e3e.js"></script><script>
//<![CDATA[
App.setController('App.Controls.Users.ShowController');
//]]>
</script><div class="is-hidden" id="template_helpers"><script id="hex_tmpl" type="template"><div data-bind-class="{{size||=small}}-hex {{class}}" data-bind-title="title"><span data-bind-text="label"></span></div></script><script id="border_hex_tmpl" type="template"><div data-bind-class="{{size||=small}}-hex {{class}}" data-bind-title="title"><div data-bind-class="inner-{{size||=small}}"><span data-bind-text="label"></span></div></div></script><script id="hidden_field" type="template"><input data-bind-id="@id" data-bind-name="@name" data-bind-value="@value" type="hidden" /></script><script id="input_field" type="template"><div data-bind-class="field_class"><label data-bind-class="%required && 'required'" data-bind-for="@id" data-bind-if="%label"><abbr data-bind-if="%required" title="required">* </abbr><span data-bind-html="%label"></span></label><div data-bind-class="field_value_class"><input data-bind-id="@id" data-bind-name="@name" data-bind-type="%type || 'text'" data-bind-value="@value | unescape_html || %defaultValue" /></div><include data-bind-each="@errors"><small data-bind-html="@"></small></include></div></script><script id="checkbox_field" type="template"><div class="boolean" data-bind-class="field_class"><div class="field_value"><div><input data-bind-name="@key" type="hidden" value="0" /><label class="checkbox"><input class="boolean" data-bind-checked="@value" data-bind-id="@id" data-bind-name="@name" type="checkbox" value="1" /><span data-bind-html="%label || @label"></span></label></div></div></div></script><script id="markdown_field" type="template"><div class="is-full-height" data-bind-class="field_class" data-bind-if="%style | eq::'full'"><div class="markdown-editor is-full-height mbn"><div class="tabs is-full-height"><dl class="tabs is-contained is-dimmed"><dd class="is-active has-tip tip-top" title="Edit your message using markdown"><a data-bind-html="{{%label}}" data-bind-if="%label" data-tab="markdown"></a><a data-bind-unless="%label" data-tab="markdown"><i class="icon-moon-edit "></i></a></dd><dd class="has-tip tip-right" title="Preview your comment"><a data-tab="preview"><i class="icon-moon-preview "></i></a></dd><dd class="has-tip tip-left" title="Edit in full-screen mode"><a class="js-expand"><i class="icon-moon-expand "></i></a></dd></dl><div class="clear"></div><ul class="tabs-content is-full-height"><li class="is-full-height is-active" data-tab="markdown"><div class="text-editor-container is-full-height"><textarea class="is-hidden" data-bind-id="@id" data-bind-name="@name" data-bind-value="@value"></textarea><div class="text-editor js-editor has-shadow"></div><div class="editor-msg-container is-hidden"><div class="alert-box"></div></div></div></li><li class="is-full-height" data-tab="preview"><div class="panel is-darkened is-overflow-auto"><div class="markdown"><p>Your rendered <a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet" target="_blank">github-flavored</a> markdown will appear here.</p></div></div></li></ul></div></div></div><div data-bind-class="field_class" data-bind-if="%style | ne::'full'"><label data-bind-class="%required && 'required'" data-bind-for="@id" data-bind-if="%label"><abbr data-bind-if="%required" title="required">* </abbr><span data-bind-html="%label"></span></label><div class="markdown-editor is-tall is-low-light" data-bind-class="%markdownEditorClass"><div class="tabs"><dl class="tabs is-contained"><dd class="is-active has-tip tip-top" title="Edit your message using markdown"><a data-tab="markdown"><i class="icon-moon-edit "></i></a></dd><dd class="has-tip tip-right" title="Preview your comment"><a data-tab="preview"><i class="icon-moon-preview "></i></a></dd><dd class="has-tip tip-right" title="Edit in full-screen mode"><a class="js-expand"><i class="icon-moon-expand "></i></a></dd></dl><ul class="tabs-content"><li class="is-full-height is-active" data-tab="markdown"><div class="text-editor-container is-full-height"><textarea class="is-hidden" data-bind-id="@id" data-bind-name="@name" data-bind-value="@value"></textarea><div class="text-editor js-editor has-shadow"></div><div class="editor-msg-container is-hidden"><div class="alert-box"></div></div></div></li><li class="is-full-height" data-tab="preview"><div class="panel is-darkened is-overflow-auto"><div class="markdown"><p>Your rendered <a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet" target="_blank">github-flavored</a> markdown will appear here.</p></div></div></li></ul></div></div></div></script><script id="code_editor_field" type="template"><div class="text-editor-container" data-bind-class="field_class" data-bind-id="{{@id}}_field"><label data-bind-class="%required && 'required'" data-bind-for="@id" data-bind-if="%label"><abbr data-bind-if="%required" title="required">* </abbr><span data-bind-html="%label"></span></label><textarea class="is-hidden" data-bind-id="@id" data-bind-name="@name" data-bind-value="@value"></textarea><div class="text-editor js-editor has-shadow"></div><div class="commands-container"><ul class="no-list-style"><li class="expand" title="Maximize Editor (esc key)"><a><i class="icon-moon-expand "></i></a></li><li class="shrink is-hidden" title="Shrink Editor (esc key)"><a><i class="icon-moon-collapse "></i></a></li></ul></div><div class="editor-msg-container is-hidden"><div class="alert-box"></div></div></div></script></div><div class="pam is-hidden js-keep" id="collection_modal"><view><script type="template"><h3>Kata: <span data-bind-html='@current.name'>kata</span>:</h3><div class="pls" data-bind-if="@loading"><p>Loading collection data...</p></div><div data-bind-unless="@loading"><div class="tabs" data-bind-unless="@adding"><dl class="tabs"><dd class="is-active"><a data-tab="personal"><i class="icon-moon-plus "></i>Add To My Collections</a></dd><dd data-bind-class="!@recent | hidden_class"><a data-tab="recent"><i class="icon-moon-collection "></i>Recently Collected In</a></dd></dl><ul class="tabs-content mbn"><li class="is-active" data-tab="personal"><div class="collection-content" data-bind-if="enough_honor?"><div class="collections" data-bind-if="@collections.length"><ul><li data-bind-data-value="@id" data-bind-each="@collections"><div><h4><i class="icon-moon-collection "></i><span data-bind-text="@name"></span></h4><div class="info-row"><span><i class="icon-moon-compare "></i><span data-bind-text="{{@code_challenges | count | string}} kata"></span></span><a data-bind-href="/collections/{{@id}}" target="collection"><i class="icon-moon-preview "></i>View</a></div></div><a class="btn is-dark is-red-text js-add-toggle" data-bind-if="added?">Remove</a><a class="btn is-dark is-green-text js-add-toggle" data-bind-unless="added?">Add</a></li></ul></div><div data-bind-unless="@collections.length"><h5>You have not created any collections yet.</h5><p>Collections are a way for you to organize kata so that you can
create your own training routines. Every collection you create is public and
automatically sharable with other warriors. After you have added a few kata to a
collection you and others can train on the kata contained within the collection.</p><p>Get started now by <a class="js-add">creating a new collection</a>.</p></div></div><div class="collection-content pam" data-bind-unless="enough_honor?">You must wait until you have earned at least 20 honor before you can create new collections.</div></li></ul></div><form class="new-collection phs" data-bind-if="@adding"><p>Set the name for your new collection. Remember, this is going to be visible by everyone
so think of something that others will understand.</p><input class="mtm" placeholder="New Collection Name" type="text" /></form><div class="collection-footer"><hr class="mbl" /><a class="btn is-green mrm js-create" data-bind-if="@adding">Create & Add</a><a class="btn js-done" data-bind-text="done_label"></a><a class="btn is-green is-right js-add" data-bind-unless="@adding || !enough_honor?">New Collection</a></div></div></script></view></div><script>// Google
(function (i, s, o, g, r, a, m) {i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m= s.getElementsByTagName(o)[0]; a.async=1; a.src=g;m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-33566223-1', 'auto');
ga('send', 'pageview');</script><script src="https://cdn.ravenjs.com/3.12.1/raven.min.js"></script><script>Raven.config('https://[email protected]/116947', {
environment: "production",
ignoreErrors: [
'top.GLOBALS',
"Can't execute code from a freed script",
"Не удается выполнить программу из освобожденного сценария",
"No se puede ejecutar código de un script liberado"
],
ignoreUrls: [
/graph.facebook.com/i,
/connect.facebook.net/en_US/all.js/i,
/extensions//i,
/^chrome:///i,
/intercomcdn/i,
/ravenjs/i,
]
}).install()</script><script>// GoSquared
!function (g, s, q, r, d) {r=g[r]=g[r]||function(){(r.q=r.q||[]).push(
arguments)};d=s.createElement(q);q=s.getElementsByTagName(q)[0];
d.src='//d1l6p2sc9645hc.cloudfront.net/tracker.js';q.parentNode.
insertBefore(d,q)}(window, document, 'script', '_gs');
_gs('GSN-087086-V');</script></body></html>
newhtml1.html:15:25
3
Answers
I guess:
should be:
or:
because there is no ‘string’ in JavaScript
Try the following..
Hope this helps