Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import jquery-ui properly

I can't get it to work and can't find any answers. Nothing is working for me.

Am I wrong by writing this into my header?

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>

my code is right, it's working in jfiddle but not outside of it.

like image 920
huhuhu Avatar asked Sep 15 '14 02:09

huhuhu


People also ask

Do you need jQuery for jQuery UI?

It really depends on what you want to do. If you just need basic DOM manipulation, even handling, and things like that, then use jquery. js. If you need advanced UI components and functionality (dragging and dropping, sorting, etc.)

Is jQuery UI still used?

Today, jQuery UI continues to be an important testbed for jQuery Core updates, helping the maintainer team spot bugs and interoperability issues that arise as the web platform evolves. With the launch of jQuery in 2006, web developers were able to access and manipulate DOM and CSS faster and easier than ever before.

Is jQuery UI a plugin?

JqueryUI is a powerful Javascript library built on top of jQuery JavaScript library. UI stands for User interface, It is a set of plug-ins for jQuery that adds new functionalities to the jQuery core library.

What is jQuery UI library?

jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications, or you just need to add a date picker to a form control, jQuery UI is a perfect choice.


1 Answers

When you leave the scheme out of a URL, it uses the scheme from the page that contains the URL. So your <script> tag should work if the URL for the page is http:something or https:something; the reason for leaving out the scheme is so that it will use SSL if your page uses SSL, because browsers often complain if a secure page tries to load a non-secure script.

If you're trying to load jQuery from a local file instead of an HTTP page, you need to put the http: scheme into the jQuery URL explicitly.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
like image 105
Barmar Avatar answered Oct 26 '22 10:10

Barmar