Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
yasmeenk
Partner - Creator
Partner - Creator

How to include Jquery CSS in qlik extension?

Hi all,

I need to create full calendar with extension. I have used Jquery full calendar, where all files are loaded except CSS. Please can anybody say how to call the CSS file in Qlik extension.

Regards,

Yasmeen

1 Solution

Accepted Solutions
reddy-s
Master II
Master II

Hi Yasmeen,

That wouldnt work as cssContent would be empty.

Use this instead:

define( ['jquery','text!./fullcalendar-min.css','./moment','./fullcalendar'],

       function ($, cssContent) {

               'use strict';

               $("<style>").html(cssContent).appendTo("head");


also make use that you are using the parent class in the css file

View solution in original post

11 Replies
reddy-s
Master II
Master II

Hi Yasmeen,

This is how you include the CSS in an extesnion:

Capture.PNG

Thanks,

Sangram

reddy-s
Master II
Master II

Also any other Jquery Library you need to include has to go into the define section parameters.

yasmeenk
Partner - Creator
Partner - Creator
Author

I tried this code, but it didn't worked.

Please correct me if I am wrong.



define( ['jquery','./moment','./fullcalendar','text!./fullcalendar-min.css'],

       function ($, cssContent) {
               'use strict';
               $("<style>").html(cssContent).appendTo("head");

reddy-s
Master II
Master II

Hi Yasmeen,

That wouldnt work as cssContent would be empty.

Use this instead:

define( ['jquery','text!./fullcalendar-min.css','./moment','./fullcalendar'],

       function ($, cssContent) {

               'use strict';

               $("<style>").html(cssContent).appendTo("head");


also make use that you are using the parent class in the css file

yasmeenk
Partner - Creator
Partner - Creator
Author

Thank you Sangram. I have tried that code but still no change. Is there any other way to solve my issue?

Thank You in advance.

Regards,

Yasmeen

reddy-s
Master II
Master II

Are you prefixing your css styles with the Parent Class css? Is the HTML's head section being injected with the css you are appending?

yasmeenk
Partner - Creator
Partner - Creator
Author

Thank you Sangaram, I tried your code and got the answer

Thanks & Regards,

Yasmeen

reddy-s
Master II
Master II

Glad it helped! 🙂

Not applicable

Hi,

I'm trying same thing using full calendar jquery scripts, however it is coming blank, I'm new to qlik sense and not sure how to invoke the js function. Can you please give details about invoking the fullCalendar function

Thanks