<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>PHPOnlineSupport - Recent questions tagged js</title>
<link>http://phponlinesupport.com/tag/js</link>
<description>Powered by Portrave Solutions Pvt. Ltd.</description>
<item>
<title>Day.js date difference not working</title>
<link>http://phponlinesupport.com/431/day-js-date-difference-not-working</link>
<description>Day.js date difference not working.&lt;br /&gt;
&lt;br /&gt;
Im not sure what I'm doing wrong here?&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var date1 = dayjs(field_data).format('D MMM YYYY');&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var date2 = dayjs().format('D MMM YYYY');&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var diff = date1.diff(date2, 'day');&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;alert(diff);&lt;br /&gt;
&lt;br /&gt;
date1 and date2 are alerting properly. But the diff just dont work.</description>
<category>Javascript</category>
<guid isPermaLink="true">http://phponlinesupport.com/431/day-js-date-difference-not-working</guid>
<pubDate>Wed, 26 Jan 2022 21:32:36 +0000</pubDate>
</item>
<item>
<title>How to format date and time in Day.js</title>
<link>http://phponlinesupport.com/427/how-to-format-date-and-time-in-day-js</link>
<description>Please help me to format my date.&lt;br /&gt;
&lt;br /&gt;
I'm using Day.js and stuck on the mud.</description>
<category>General</category>
<guid isPermaLink="true">http://phponlinesupport.com/427/how-to-format-date-and-time-in-day-js</guid>
<pubDate>Wed, 26 Jan 2022 20:43:44 +0000</pubDate>
</item>
<item>
<title>Find all active links on a page with JS (not hashed '#')</title>
<link>http://phponlinesupport.com/293/find-all-active-links-on-a-page-with-js-not-hashed</link>
<description>How do you find all active links on a page with JS which are not hashed '#' (non-hashed) ?</description>
<category>Jquery</category>
<guid isPermaLink="true">http://phponlinesupport.com/293/find-all-active-links-on-a-page-with-js-not-hashed</guid>
<pubDate>Wed, 25 Jul 2018 21:16:42 +0000</pubDate>
</item>
<item>
<title>load js files dynamically on the fly</title>
<link>http://phponlinesupport.com/166/load-js-files-dynamically-on-the-fly</link>
<description>


&lt;p&gt;How can I tell Laravel-5 which Javascript files I want to include in a template.&lt;/p&gt;

&lt;p&gt;For example, I have my Controller with something like this:&lt;/p&gt;

&lt;pre&gt;return view('butchery', ['locations' =&amp;gt; $locations, 'classTypes' =&amp;gt; $classTypes]);&lt;/pre&gt;

&lt;p&gt;I have my &lt;em&gt;butchery.blade.php&lt;/em&gt; template with my html:&lt;/p&gt;

&lt;pre&gt;@extends('app')
@section('content')
&amp;lt;!-- html here --&amp;gt;
@endsection&lt;/pre&gt;

&lt;p&gt;...and I have my app.blade.php container template with all my javascript files at the bottom. If I didn't want to include one of the javascript files in my view, how would I do that?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;app.blade.php&lt;/em&gt;:&lt;/p&gt;

&lt;pre&gt;&amp;lt;!DOCTYPE HTML&amp;gt;
&amp;lt;!--[if IE 8]&amp;gt;&amp;lt;html class=&quot;ie8&quot;&amp;gt; &amp;lt;![endif]--&amp;gt;
&amp;lt;!--[if gt IE 8]&amp;gt;&amp;lt;!--&amp;gt;&amp;lt;html&amp;gt;&amp;lt;!--&amp;lt;![endif]--&amp;gt;

&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;@yield('content')&amp;lt;/body&amp;gt;
&amp;lt;script src=&quot;/js/mobile-menu.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;!-- apply voucher code --&amp;gt; 
&amp;lt;script src=&quot;/js/voucher-apply.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
</description>
<category>Laravel</category>
<guid isPermaLink="true">http://phponlinesupport.com/166/load-js-files-dynamically-on-the-fly</guid>
<pubDate>Mon, 17 Oct 2016 03:22:30 +0000</pubDate>
</item>
<item>
<title>Add JavaScript to page</title>
<link>http://phponlinesupport.com/58/add-javascript-to-page</link>
<description>Is there a way that we can include a JS to a Magento page without hard-coding it directly on the page?</description>
<category>Magento</category>
<guid isPermaLink="true">http://phponlinesupport.com/58/add-javascript-to-page</guid>
<pubDate>Mon, 13 Jun 2016 07:54:26 +0000</pubDate>
</item>
</channel>
</rss>