JavaScript Reference

Posted by netwebtest123@gmail.com on 24-Apr-2019 06:57

Hello Everyone,

I have used widgets as "Content Block" and it's contents Html as a text in "text-editor", but I am not able to add any reference like JavaScript? I want to add below line in html but it was not working.

<script src="cdnjs.cloudflare.com/.../script>
<script>
$(document).ready(function() {
$('.partner-filter li').on('click', function() {
$(this).addClass('active');
$(this).siblings(".active").removeClass('active');
});
var filterizd = $('.filtr-container').filterizr({
});
});

All Replies

Posted by jread on 24-Apr-2019 20:15

To insert JavaScipt you should use the Javascript Widget.  Use one widget to import the external script & use another to write your code. www.progress.com/.../javascript-widget-mvc

Posted by netwebtest123@gmail.com on 25-Apr-2019 12:39

Thanks [mention:618aa021aa0d4f59b0baea5ca3e34d66:e9ed411860ed4f2ba0265705b8793d05] ,

I am new in sitefinity so can you please help me how to do that.

As per your replay do you mean I have to create two widget one for external script and another for html code.

Q. Where I can load both widget?

Q. How to get JavaScript reference from another widget?

Posted by jread on 25-Apr-2019 14:09

Hey netwebtest123@gmail.com,

The Widget lives under the Scripts & Style Section in the widget toolbox in the page builder.  here is a short video of using two instances of the script widget, one for importing the external library second instance to write you custom JS.

screencast-o-matic.com/.../cqfT21Z49M

Posted by netwebtest123@gmail.com on 26-Apr-2019 06:28

Hi [mention:618aa021aa0d4f59b0baea5ca3e34d66:e9ed411860ed4f2ba0265705b8793d05] ,

Thanks for your response it's working as per the your reference. Thanks again for help me.

This thread is closed