Haradzieniec
Haradzieniec

Reputation: 9340

Should I connect jquery-ui.css if jquery-ui.js is connected?

Should I connect both jquery-ui.js and jquery-ui.css files if the page looks fine with jquery-ui.js but without jquery-ui.css?

Should I care about jquery-ui.css?

P.S. jquery-ui.js is definitely needed for my slider, but the slider looks fine even without jquery-ui.css.

Thanks.

Upvotes: 1

Views: 47

Answers (2)

G . R
G . R

Reputation: 541

Yes, For example if you use ui.datepicker on your page,the style of the calender will not be taken if you dont include css file also in your page.

Upvotes: 1

Frédéric Hamidi
Frédéric Hamidi

Reputation: 262919

Yes, you should.

Most of the jQuery UI widgets depend on style rules defined in that file to perform their layout. Omitting it will give you strange bugs such as, for instance, dialog boxes not being properly rendered, or tabs and accordions not laying out correctly.

Upvotes: 2

Related Questions