Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

yasmeenk
Contributor

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
reddys310
Honored Contributor II

Re: How to include Jquery CSS in qlik extension?

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

11 Replies
reddys310
Honored Contributor II

Re: How to include Jquery CSS in qlik extension?

Hi Yasmeen,

This is how you include the CSS in an extesnion:

Capture.PNG

Thanks,

Sangram

reddys310
Honored Contributor II

Re: How to include Jquery CSS in qlik extension?

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

yasmeenk
Contributor

Re: How to include Jquery CSS in qlik extension?

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");

reddys310
Honored Contributor II

Re: How to include Jquery CSS in qlik extension?

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
Contributor

Re: How to include Jquery CSS in qlik extension?

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

reddys310
Honored Contributor II

Re: How to include Jquery CSS in qlik extension?

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
Contributor

Re: How to include Jquery CSS in qlik extension?

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

Thanks & Regards,

Yasmeen

reddys310
Honored Contributor II

Re: How to include Jquery CSS in qlik extension?

Glad it helped! :-)

Not applicable

Re: How to include Jquery CSS in qlik extension?

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