{"id":61287,"date":"2021-10-18T00:27:49","date_gmt":"2021-10-18T00:27:49","guid":{"rendered":"https:\/\/papersspot.com\/blog\/2021\/10\/18\/general-javascript-questions\/"},"modified":"2021-10-18T00:27:49","modified_gmt":"2021-10-18T00:27:49","slug":"general-javascript-questions","status":"publish","type":"post","link":"https:\/\/papersspot.com\/blog\/2021\/10\/18\/general-javascript-questions\/","title":{"rendered":"General javascript questions"},"content":{"rendered":"<p>I have the following scripts as examples, but I don&#8217;t really understand what they do. If someone could give me a brief explanation that would be great, thankyou.\u00a0 <\/p>\n<p>\u00a0 \u00a01) countryDropdown.init(true, JSON.parse(&#8216;@Html.Raw(Json.Encode(Model.CountryViewModel.Cities))&#8217;)); <\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 $(document).ready(function() { <br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 initDatepicker.initDay($(&#8216;.input-append.date&#8217;), true); <br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 loadFilterValues.load(); <br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 initSelectPicker.init($(&#8216;select[name=PeopleIds]&#8217;), &#8216;Any Person&#8217;); <br \/>\u00a0 \u00a0 \u00a0 \u00a0 }); <br \/>\u00a0 \u00a0  <br \/>2)\u00a0 <br \/>\u00a0 \u00a0  <br \/>\u00a0 \u00a0 \u00a0 \u00a0 $(document).ready(function() { <br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 $(&#8216;.btnDelete&#8217;).click(function() { <br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 $(&#8216;.btnConfirm&#8217;).attr(&#8216;href&#8217;, $(&#8216;.btnConfirm&#8217;).attr(&#8216;href&#8217;) &#8216;?id=&#8217; $(this).data(&#8216;id&#8217;)); <br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 }); <br \/>\u00a0 \u00a0 \u00a0 \u00a0 }); <br \/>\u00a0 \u00a0  <br \/>} <br \/>3) Also, in some areas I have seen references like &#8221; <br \/>\u00a0 \u00a0  <br \/>\u00a0 \u00a0 &#8221; referenced with no other code, does this actually do anything?\u00a0Thanks in advance! <\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have the following scripts as examples, but I don&#8217;t really understand what they do. If someone could give me a brief explanation that would be great, thankyou.\u00a0 \u00a0 \u00a01) countryDropdown.init(true, JSON.parse(&#8216;@Html.Raw(Json.Encode(Model.CountryViewModel.Cities))&#8217;)); \u00a0 \u00a0 \u00a0 \u00a0 $(document).ready(function() { \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 initDatepicker.initDay($(&#8216;.input-append.date&#8217;), true); \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 loadFilterValues.load(); \u00a0 \u00a0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[20],"class_list":["post-61287","post","type-post","status-publish","format-standard","hentry","category-research-paper-writing","tag-programming"],"_links":{"self":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/61287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/comments?post=61287"}],"version-history":[{"count":0,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/posts\/61287\/revisions"}],"wp:attachment":[{"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/media?parent=61287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/categories?post=61287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/papersspot.com\/blog\/wp-json\/wp\/v2\/tags?post=61287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}