<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Question2Answer Q&amp;A - Recent questions tagged js</title>
<link>https://www.question2answer.org/qa/tag/js</link>
<description>Powered by Question2Answer</description>
<item>
<title>How to add JS file to all pages on my website?</title>
<link>https://www.question2answer.org/qa/82678/how-to-add-js-file-to-all-pages-on-my-website</link>
<description>

&lt;p&gt;I am trying to add an Adblock detector to my website. I am using the suggestions that I found &lt;a rel=&quot;nofollow&quot; href=&quot;https://stackoverflow.com/questions/4869154/how-to-detect-adblock-on-my-website&quot;&gt;here&lt;/a&gt;. As it was recommended, I created ads.js file in the document root of my website. This file is accessible only from the root webpage, e.g. &lt;a href=&quot;https://mywebsite.com/ads.js&quot; rel=&quot;nofollow&quot;&gt;https://mywebsite.com/ads.js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But any pages on my website simply don't see it.&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-size:14px&quot;&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;2020/04/10 21:50:01 [error] 10312#10312: *3053530 open() &quot;/var/www/website/tag/ads.js&quot; failed (2: No such file or directory), client: 98.33.30.36, server: website.com, request: &quot;GET /tag/ads.js HTTP/1.1&quot;, host: &quot;website.com&quot;, referrer: &quot;&lt;a href=&quot;https://website.com/tag/nginx&quot;&quot; rel=&quot;nofollow&quot;&gt;https://website.com/tag/nginx&quot;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;font-size:14px&quot;&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;2020/04/10 21:47:21 [error] 10312#10312: *3053478 open() &quot;/var/www/website/1466/ads.js&quot; failed (2: No such file or directory), client: 88.155.169.198, server: website.com, request: &quot;GET /1466/ads.js HTTP/1.1&quot;, host: &quot;website.com&quot;, referrer: &quot;&lt;a href=&quot;https://website.com/1466/linux-dlya-slabyx-kompyuterov-i-noutbukov&quot;&quot; rel=&quot;nofollow&quot;&gt;https://website.com/1466/linux-dlya-slabyx-kompyuterov-i-noutbukov&quot;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;span style=&quot;color:#333333; font-family:sans-serif,Arial,Verdana,&amp;quot;Trebuchet MS&amp;quot;,&amp;quot;Apple Color Emoji&amp;quot;,&amp;quot;Segoe UI Emoji&amp;quot;,&amp;quot;Segoe UI Symbol&amp;quot;; font-size:16px&quot;&gt;Any ideas on how to fix that?&lt;/span&gt;&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/82678/how-to-add-js-file-to-all-pages-on-my-website</guid>
<pubDate>Sat, 11 Apr 2020 05:04:54 +0000</pubDate>
</item>
<item>
<title>Uncaught ReferenceError: $ is not defined</title>
<link>https://www.question2answer.org/qa/74306/uncaught-referenceerror-%24-is-not-defined</link>
<description>what does this mean and how to fix it. &lt;a href=&quot;https://satechhelp.co.za/qa-theme/SnowFlat/js/snow-core.js?1.8.3:19&quot; rel=&quot;nofollow&quot;&gt;https://satechhelp.co.za/qa-theme/SnowFlat/js/snow-core.js?1.8.3:19&lt;/a&gt;. Found on Google search console url inspection. &lt;br /&gt;
&lt;br /&gt;
STACK TRACE</description>
<category>Themes</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/74306/uncaught-referenceerror-%24-is-not-defined</guid>
<pubDate>Mon, 22 Apr 2019 04:51:13 +0000</pubDate>
</item>
<item>
<title>Is  it standard way to modify the theme using JavaScript?</title>
<link>https://www.question2answer.org/qa/62963/is-it-standard-way-to-modify-the-theme-using-javascript</link>
<description>To give a new look to my website, I have added Javascript code which hides some elements and changes the order of elements according to my requirements. &amp;nbsp;the size of JS file is very small.&lt;br /&gt;
&lt;br /&gt;
So , I want to know is it a standard way to get the job done?</description>
<category>Themes</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/62963/is-it-standard-way-to-modify-the-theme-using-javascript</guid>
<pubDate>Mon, 19 Mar 2018 04:22:16 +0000</pubDate>
</item>
<item>
<title>Merge qa-page.js and snow-core.js &amp;&amp; move inline scripts to MERGED.js</title>
<link>https://www.question2answer.org/qa/59168/merge-qa-page-js-and-snow-core-js-%26%26-move-inline-scripts-merged</link>
<description>

&lt;p&gt;Dear friends,&lt;/p&gt;

&lt;p&gt;I guess its very important from server perspective to combine js files into ONE.js file and move header inline scripts to this ONE.js.&lt;/p&gt;

&lt;p&gt;Currently, I point CDN path for&amp;nbsp;&lt;span style=&quot;color:rgb(34, 34, 34); font-family:consolas,lucida console,courier new,monospace; font-size:12px&quot;&gt;qa-content/jquery-1.11.3.min.js file. So, I dont need to deal with this anymore. However, I have only two js files in home-page:&amp;nbsp;&lt;/span&gt;qa-page.js and snow-core.js (just ignore other pages). Can I just copy paste all codes from qa-page.js into snow-core.js (I will use only snowflat theme). And where to remove call for&amp;nbsp;qa-page.js?&lt;/p&gt;

&lt;p&gt;More importantly, I have two inline scripts in head and one inline script in body. Two scripts in head are: (&amp;lt;script&amp;gt;var eventnotifyAjaxURL = &quot;./eventnotify&quot;&amp;lt;/script&amp;gt;) and&amp;nbsp;(&amp;lt;script&amp;gt;var qa_root = '.\/'; var qa_request = 'hot';&amp;lt;/script&amp;gt;)&amp;nbsp;&lt;/p&gt;

&lt;p&gt;This eventnotify comes from On-Site Notification plugin. Code is like this:&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;if(qa_opt('q2apro_onsitenotifications_enabled') &amp;amp;&amp;amp; qa_is_logged_in()) {&lt;/p&gt;

&lt;p&gt;$this-&amp;gt;output('&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/p&gt;

&lt;p&gt;var eventnotifyAjaxURL = &quot;'.qa_path('eventnotify').'&quot;;&lt;/p&gt;

&lt;p&gt;&amp;lt;/script&amp;gt;');&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;One inline script in body is:&amp;nbsp;&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;&amp;lt;script&amp;gt;var b=document.getElementsByTagName('body')[0];b.className=b.className.replace('qa-body-js-off', 'qa-body-js-on');&amp;lt;/script&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;My question is how to move all these inline scripts both in head and body into snow-core.js ? Is it possible? Will the site work properly? Please guide how to do it.&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/59168/merge-qa-page-js-and-snow-core-js-%26%26-move-inline-scripts-merged</guid>
<pubDate>Mon, 21 Aug 2017 15:48:43 +0000</pubDate>
</item>
<item>
<title>Q2A Theme: location.href javascript function is not working</title>
<link>https://www.question2answer.org/qa/58249/q2a-theme-location-href-javascript-function-is-not-working</link>
<description>

&lt;p&gt;I am trying to implement features for SSO site to make it not so different from the old one.&amp;nbsp;&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;&lt;span style=&quot;color:rgb(0, 128, 255); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;'buttons'&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:rgb(128, 128, 128); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;=&amp;gt;&amp;nbsp;array(&lt;/span&gt;
&lt;br&gt;&lt;span style=&quot;color:rgb(0, 128, 255); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;'account'&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:rgb(128, 128, 128); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;=&amp;gt;&amp;nbsp;array(&lt;/span&gt;
&lt;br&gt;&lt;span style=&quot;color:rgb(0, 128, 255); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'tags'&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:rgb(128, 128, 128); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 128, 255); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;'onClick=&quot;qa_edit_profile()&quot;'&lt;/span&gt;&lt;span style=&quot;color:rgb(128, 128, 128); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;,&lt;/span&gt;
&lt;br&gt;&lt;span style=&quot;color:rgb(0, 128, 255); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'label'&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:rgb(128, 128, 128); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;=&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 0, 0); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;qa_html&lt;/span&gt;&lt;span style=&quot;color:rgb(128, 128, 128); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 128, 255); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;&quot;Edit Profile&quot;&lt;/span&gt;&lt;span style=&quot;color:rgb(128, 128, 128); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;)&amp;nbsp;,&lt;/span&gt;
&lt;br&gt;&lt;span style=&quot;color:rgb(128, 128, 128); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; )&amp;nbsp;,
&lt;br&gt;)&amp;nbsp;,&lt;/span&gt;&lt;span style=&quot;color:rgb(255, 148, 0); font-family:lucida console,monaco,monospace; font-size:10.6667px&quot;&gt; &lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;As you can see, the onClick event will call the qa_edit_profile() function which I has written in qa-content\qa-page.js file:&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;function qa_edit_profile()
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;location.href = &quot;www.yoursite.com&quot;;
&lt;br&gt;}&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;But when I click, it doesn't work. While other function works like alert(),...&lt;/p&gt;

&lt;p&gt;So the question is, is there any solution to make the browser redirect to an URL when click on a button?&lt;/p&gt;</description>
<category>Themes</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/58249/q2a-theme-location-href-javascript-function-is-not-working</guid>
<pubDate>Fri, 23 Jun 2017 04:51:35 +0000</pubDate>
</item>
<item>
<title>Why does moving js files to load in footer breaks the infinite ajax scroll plugin?</title>
<link>https://www.question2answer.org/qa/57750/does-moving-files-load-footer-breaks-infinite-scroll-plugin</link>
<description>I moved most of my js files into the footer() so they load last to optimise the page without touching the ias plugin code - however doing this breaks the infinite ajax scroll plugin. The bottom of the page reverts back to the numbered pages links.&lt;br /&gt;
&lt;br /&gt;
Has anyone come across this or any thoughts of which js files ias needs to load before its js or how best to move the ias js files? I have tried to put them in the footer() function in the plugin but this doesn't seem to work - I guess there may be a conflict between the footer being defined twice...</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/57750/does-moving-files-load-footer-breaks-infinite-scroll-plugin</guid>
<pubDate>Wed, 17 May 2017 21:54:36 +0000</pubDate>
</item>
<item>
<title>Merge JS and CSS files - Example of typewriter cms</title>
<link>https://www.question2answer.org/qa/51604/merge-js-and-css-files-example-of-typewriter-cms</link>
<description>Thought it is worth pointing out that typewriter CMS has an option to merge / compact all JS files into one, same for CSS: &lt;a href=&quot;http://www.typesettercms.com/&quot; rel=&quot;nofollow&quot;&gt;http://www.typesettercms.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
See open source repo for the code: &lt;a href=&quot;https://github.com/Typesetter/Typesetter&quot; rel=&quot;nofollow&quot;&gt;https://github.com/Typesetter/Typesetter&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Hope to see something like this in q2a in the future.</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/51604/merge-js-and-css-files-example-of-typewriter-cms</guid>
<pubDate>Mon, 02 May 2016 04:40:51 +0000</pubDate>
</item>
<item>
<title>Why isn't my custom javascript code working in q2a?</title>
<link>https://www.question2answer.org/qa/47345/why-isnt-my-custom-javascript-code-working-in-q2a</link>
<description>I've written a custom js function to check input data in ask page. function checks whether there's question mark at the end of the sentence and so on... when user moves to next input field(by onBlur=&amp;quot;&amp;quot; event)&lt;br /&gt;
&lt;br /&gt;
I've added it to qa-ask.js file first, then to the ask page itself. But in both situations it isn't working. Why it isn't working???&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Code itself is fine. But it's not working when applied to q2a&lt;br /&gt;
&lt;br /&gt;
function validateInput() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;var val = document.getElementById(&amp;quot;title&amp;quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;val.value.trim();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;len = val.value.length - 1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;lastS = val.value.slice(len);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;if (lastS != &amp;quot;?&amp;quot;) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;document.getElementById(&amp;quot;error&amp;quot;).innerHTML = &amp;quot;add '?'.&amp;quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;.........&lt;br /&gt;
&lt;br /&gt;
any help is appreciated</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/47345/why-isnt-my-custom-javascript-code-working-in-q2a</guid>
<pubDate>Fri, 14 Aug 2015 07:36:34 +0000</pubDate>
</item>
<item>
<title>java script problem in theme</title>
<link>https://www.question2answer.org/qa/43193/java-script-problem-in-theme</link>
<description>

&lt;p&gt;hi&lt;/p&gt;

&lt;p&gt;i try to add this java script to my qa-theme.php for typing some things :&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;'&amp;lt;div class=&quot;container&quot;&amp;gt;',
&lt;br&gt;'&amp;lt;!-- news --&amp;gt;',
&lt;br&gt;'&amp;lt;style type=&quot;text/css&quot;&amp;gt;#tickform a{text-decoration: none;}#tickform a:hover{text-decoration: none;}&amp;lt;/style&amp;gt;',&lt;/p&gt;

&lt;p&gt;'&amp;lt;br&amp;gt;',
&lt;br&gt;'&amp;lt;div id=&quot;tickform&quot;&amp;gt;آخرين مطالب&amp;lt;/div&amp;gt;',&lt;/p&gt;

&lt;p&gt;'&amp;lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&amp;gt;',
&lt;br&gt;'var max=0;',
&lt;br&gt;'function textlist(){',
&lt;br&gt;'max=textlist.arguments[0].length;',
&lt;br&gt;'for(i=0;i&amp;lt;max;i++)',
&lt;br&gt;'this[i]=textlist.arguments[0][i];',
&lt;br&gt;'}',
&lt;br&gt;'var pausecontent2=new Array();',
&lt;br&gt;'var pausecontent=new Array();',
&lt;br&gt;'var i=0;',
&lt;br&gt;'&amp;lt;/script&amp;gt;',
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' &amp;lt;div class=&quot;sidebar-latest&quot;&amp;gt;',
&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'&amp;lt;ul&amp;gt;',
&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'&amp;lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&amp;gt;',
&lt;br&gt;'/*&amp;lt;![CDATA[*/',
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'pausecontent2[i]=\'&amp;lt;a href=&quot;#&quot; title=&quot;برای نمایش اطلاعات تماس کلیک نمایید&quot; target=&quot;_blank&quot; &amp;gt;\';',
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'pausecontent[i]=\'كليه خدمات سخت افزاري پشتيبان نوت بوك بر حسب موضوع شامل 1 تا 3 ماه ضمانت مي باشد و در فاكتور مشتري قيد مي گردد.\';',
&lt;br&gt;'i++;',
&lt;br&gt;'/*]]&amp;gt;*/',
&lt;br&gt;'&amp;lt;/script&amp;gt;',
&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;
&lt;br&gt;'&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;',
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'pausecontent2[i]=\'&amp;lt;a href=&quot;#&quot; title=&quot;برای نمایش اطلاعات تماس کلیک نمایید&quot; target=&quot;_blank&quot; &amp;gt;\';',
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'pausecontent[i]=\'کاربر گرامی با استفاده از بخش ثبت سوال می توانید به صورت آنلاين،مشکلات نوت بوک خود را جهت بررسي و اعلام هزينه با ما در ميان بگذاريد.\';',
&lt;br&gt;'tl=new textlist(pausecontent);',
&lt;br&gt;'var x=0;pos=0;',
&lt;br&gt;'var l=tl[0].length;',
&lt;br&gt;'function textticker(){',
&lt;br&gt;'document.getElementById(&quot;tickform&quot;).innerHTML=pausecontent2[x]+tl[x].substring(0,pos)+ &quot;_&amp;lt;/a&amp;gt;&amp;lt;div class=\&quot;clear\&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/li&amp;gt;&quot;;',
&lt;br&gt;'if(pos++==l){',
&lt;br&gt;'pos=0;',
&lt;br&gt;'setTimeout(&quot;textticker()&quot;,2000);',
&lt;br&gt;'if(++x==max)x=0;',
&lt;br&gt;'l=tl[x].length;',
&lt;br&gt;'}else',
&lt;br&gt;'setTimeout(&quot;textticker()&quot;,250);',
&lt;br&gt;'}',
&lt;br&gt;'window.onload=textticker();',
&lt;br&gt;'&amp;lt;/script&amp;gt;',
&lt;br&gt;'&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;',
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'pausecontent2[i]=\'&amp;lt;a href=&quot;#&quot; title=&quot;برای نمایش اطلاعات تماس کلیک نمایید&quot; target=&quot;_blank&quot; &amp;gt;\';',
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'pausecontent[i]=\'کاربر گرامی با استفاده از بخش ثبت سوال می توانید به صورت آنلاين،مشکلات نوت بوک خود را جهت بررسي و اعلام هزينه با ما در ميان بگذاريد.\';',
&lt;br&gt;'tl=new textlist(pausecontent);',
&lt;br&gt;'var x=0;pos=0;',
&lt;br&gt;'var l=tl[0].length;',
&lt;br&gt;'function textticker(){',
&lt;br&gt;'document.getElementById(&quot;tickform&quot;).innerHTML=pausecontent2[x]+tl[x].substring(0,pos)+ &quot;_&amp;lt;/a&amp;gt;&amp;lt;div class=\&quot;clear\&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/li&amp;gt;&quot;;',
&lt;br&gt;'if(pos++==l){',
&lt;br&gt;'pos=0;',
&lt;br&gt;'setTimeout(&quot;textticker()&quot;,2000);',
&lt;br&gt;'if(++x==max)x=0;',
&lt;br&gt;'l=tl[x].length;',
&lt;br&gt;'}else',
&lt;br&gt;'setTimeout(&quot;textticker()&quot;,250);',
&lt;br&gt;'}',
&lt;br&gt;'window.onload=textticker();',
&lt;br&gt;'&amp;lt;/script&amp;gt;',
&lt;br&gt;'&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;',
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'pausecontent2[i]=\'&amp;lt;a href=&quot;#&quot; title=&quot;برای نمایش اطلاعات تماس کلیک نمایید&quot; target=&quot;_blank&quot; &amp;gt;\';',
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'pausecontent[i]=\'کاربر گرامی با استفاده از بخش ثبت سوال می توانید به صورت آنلاين،مشکلات نوت بوک خود را جهت بررسي و اعلام هزينه با ما در ميان بگذاريد.\';',
&lt;br&gt;'tl=new textlist(pausecontent);',
&lt;br&gt;'var x=0;pos=0;',
&lt;br&gt;'var l=tl[0].length;',
&lt;br&gt;'function textticker(){',
&lt;br&gt;'document.getElementById(&quot;tickform&quot;).innerHTML=pausecontent2[x]+tl[x].substring(0,pos)+ &quot;_&amp;lt;/a&amp;gt;&amp;lt;div class=\&quot;clear\&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/li&amp;gt;&quot;;',
&lt;br&gt;'if(pos++==l){',
&lt;br&gt;'pos=0;',
&lt;br&gt;'setTimeout(&quot;textticker()&quot;,2000);',
&lt;br&gt;'if(++x==max)x=0;',
&lt;br&gt;'l=tl[x].length;',
&lt;br&gt;'}else',
&lt;br&gt;'setTimeout(&quot;textticker()&quot;,250);',
&lt;br&gt;'}',
&lt;br&gt;'window.onload=textticker();',
&lt;br&gt;'&amp;lt;/script&amp;gt;',
&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'&amp;lt;/ul&amp;gt;',
&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;'&amp;lt;/div&amp;gt;',
&lt;br&gt;'&amp;lt;!-- news --&amp;gt;',&lt;/p&gt;

&lt;p&gt;'&amp;lt;/div&amp;gt;',&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;but when i using this script q2a cats and checkbox js has been disable&amp;nbsp;&lt;/p&gt;

&lt;p&gt;i think it is an Interference between q2a scripts and my script&lt;/p&gt;

&lt;p&gt;how can i solve it ?&lt;/p&gt;</description>
<category>Themes</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/43193/java-script-problem-in-theme</guid>
<pubDate>Sat, 24 Jan 2015 04:13:51 +0000</pubDate>
</item>
<item>
<title>To override  qa_category_select(idprefix, startpath) (js file)</title>
<link>https://www.question2answer.org/qa/40335/to-override-qa_category_select-idprefix-startpath-js-file</link>
<description>Is there a way to override the function &amp;nbsp;qa_category_select(idprefix, startpath) at the javascript file qa-content\qa-ask.js?&lt;br /&gt;
&lt;br /&gt;
I somehow know how to override php function of qa-theme-base but this one is javascript and donno how to do it? Can we at all?&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
What I am trying to do is to do something based on the category the user selected.&lt;br /&gt;
&lt;br /&gt;
Example if the category-id =1 is selected then display some javascript alert message</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/40335/to-override-qa_category_select-idprefix-startpath-js-file</guid>
<pubDate>Tue, 28 Oct 2014 15:57:41 +0000</pubDate>
</item>
<item>
<title>How can I move JS files to the bottom?</title>
<link>https://www.question2answer.org/qa/36339/how-can-i-move-js-files-to-the-bottom</link>
<description>How can I move JS files to the bottom? Is there any plugin or way to do this?</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/36339/how-can-i-move-js-files-to-the-bottom</guid>
<pubDate>Fri, 25 Jul 2014 18:33:18 +0000</pubDate>
</item>
<item>
<title>Request of qa-page.js improvement</title>
<link>https://www.question2answer.org/qa/24943/request-of-qa-page-js-improvement</link>
<description>

&lt;p&gt;
	Although I cannot clarify conditions, javascript error occurs at the time of form operation, and ajax processing don't finish.&lt;/p&gt;


&lt;p&gt;
	&lt;img alt=&quot;&quot; src=&quot;http://www.question2answer.org/qa/?qa=blob&amp;amp;qa_blobid=5814155793619698696&quot; style=&quot;width: 534px; height: 86px; background-color: rgb(238, 238, 238); border: 1px solid rgb(204, 204, 204); padding: 5px;&quot;&gt;&lt;/p&gt;


&lt;p&gt;
	I wish improvement of qa-page.js (L39 - qa_set_inner_html()).&lt;/p&gt;


&lt;p&gt;
	Before:&lt;/p&gt;


&lt;blockquote&gt;
	

&lt;p&gt;
		function qa_set_inner_html(elem, type, html)
&lt;br&gt;
		{
&lt;br&gt;
		&amp;nbsp;&amp;nbsp; &amp;nbsp;elem.innerHTML=html;
&lt;br&gt;
		}&lt;/p&gt;
&lt;/blockquote&gt;


&lt;p&gt;
	After:&lt;/p&gt;


&lt;blockquote&gt;
	

&lt;p&gt;
		function qa_set_inner_html(elem, type, html)
&lt;br&gt;
		{
&lt;br&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp; if (elem)
&lt;br&gt;
		&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elem.innerHTML=html;
&lt;br&gt;
		}&lt;/p&gt;
&lt;/blockquote&gt;


&lt;p&gt;
	Related question(2012-04):
&lt;br&gt;
	&lt;a href=&quot;http://www.question2answer.org/qa/14327/javascript-error-at-first-answer&quot; rel=&quot;nofollow&quot;&gt;http://www.question2answer.org/qa/14327/javascript-error-at-first-answer&lt;/a&gt;&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/24943/request-of-qa-page-js-improvement</guid>
<pubDate>Thu, 27 Jun 2013 01:59:25 +0000</pubDate>
</item>
<item>
<title>How do I change the path from which the css is linked</title>
<link>https://www.question2answer.org/qa/19574/how-do-i-change-the-path-from-which-the-css-is-linked</link>
<description>

&lt;p&gt;
	I'm trying to add Q2A to my site. I've currently set it up as such that the Q2A install is in a sub folder but I want the functionality output in the layer above.&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p style=&quot;margin-left: 40px;&quot;&gt;
	domain.com/questionsandanswers.php&amp;nbsp; // this is the location of the Q2A and I just includet the qa-index.php file&lt;/p&gt;


&lt;p style=&quot;margin-left: 40px;&quot;&gt;
	domain.com/questions/&amp;nbsp; //this is the actual location of the Q2A install&lt;/p&gt;


&lt;p style=&quot;margin-left: 40px;&quot;&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	Now this works find except it does not seem to be looking for the css/js files in the correct place. FireBug shows that it's trying to load them from &lt;span style=&quot;background-color:#ffff00;&quot;&gt;domain.com/qa_content/&lt;/span&gt; whereas it should be loading from &lt;span style=&quot;background-color:#ffff00;&quot;&gt;domain.com/questions/qa_content/&lt;/span&gt;. I've changed the QA_BASE_DIR value before including qa-index.php and all the rest works fine - with a few exceptions but their minor.&lt;/p&gt;


&lt;p&gt;
	Any ideas where I need to change the links to the css/js files?&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/19574/how-do-i-change-the-path-from-which-the-css-is-linked</guid>
<pubDate>Fri, 30 Nov 2012 00:29:52 +0000</pubDate>
</item>
<item>
<title>NEW js  button pop-up &quot;answer&quot;</title>
<link>https://www.question2answer.org/qa/12431/new-js-button-pop-up-answer</link>
<description>

&lt;p&gt;
	Hello!&lt;/p&gt;


&lt;p&gt;
	I had an idea a little, but not like I can not realize it ... In general, I have to Q2A large user activity, they often answer questions and comment on the answers of other participants, in this case, the page with the question becomes very long ... whether using &lt;span style=&quot;font-size:14px;&quot;&gt;&lt;span style=&quot;color:#0000ff;&quot;&gt;&lt;strong&gt;js &lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;to add a button pop-up &quot;answer&quot; that pops up when scrolling down?&lt;/p&gt;


&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;


&lt;p&gt;
	P.S. &amp;nbsp;Sorry for my English, I'm from Russia&amp;nbsp;&lt;/p&gt;</description>
<category>Plugins</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/12431/new-js-button-pop-up-answer</guid>
<pubDate>Thu, 02 Feb 2012 13:01:02 +0000</pubDate>
</item>
</channel>
</rss>