Hai,
I've got a project which uses jQuery 1.2.1, and I cannot update the version. I need to create an incremental slider bar the same as the jQuery UI example (http://jqueryui.com/demos/slider/#steps). The legacy download of jQuery UI is for 1.2.6 so even that will not cut the mustard.
Does anyone know of a way to emulate the same functionality using the older version of jQuery, or even know where I can download a version of jQuery UI which is compatible with jQuery 1.2.1 ?
Alternativly, does anyone know of any issues, such as deprecated functions, that might cause issues if I update the jQuery from 1.2.1 to 1.7.2 as this would be my ideal preference for all the obvious reasons.
Any help would be apprecaited.
Ta
No problem. Just use two jQuery versions at the same time
...
<link rel="stylesheet" href="themes/base/jquery-ui.1.7.2.css" type="text/css" />
//include 1.3.2 + UI
<script src="jquery-1.3.2.min.js"></script>
<script src="jquery-ui-1.7.2.min.js"></script>
//call noConflict. Now you can reference the new jQuery via $j instead of $
<script type="text/javascript">var $j = jQuery.noConflict(true);</script>
//include 1.2.1 which is normally available via $ and jQuery
<script src="jquery-1.2.1.js"></script>
...
Demopage: http://jsbin.com/ofuma
Why don't you try including the google-hosted jQuery:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
and just comment out your current version. Then you can see whether everything stays compatible. I would have thought that would be a lot easier than trying to work with a legacy version.
Related
I have a question for you about jQuery.noConflict.
First of all - I did some research on what
jQuery.noConflict(true)
is, my question is related to this closely. So far I have found no answer that I was able to apply to my case, so if the answer is obvious and slipped my mind I apologize in advance.
The problem:
I am currently trying to solve a problem for a very large JS application. The JS application runs on a SAMSUNG browser (based on Orsay), which in turn runs on specific SAMSUNG displays.
To use display functions it is required to include:
<!-- TODO : Common API -->
<script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/Common/API/Widget.js"></script>
<script type="text/javascript" language="javascript" src="$MANAGER_WIDGET/Common/API/TVKeyValue.js"></script>
<script type='text/javascript' src='$MANAGER_WIDGET/Common/af/2.0.0/loader.js'></script>
<script type='text/javascript' src='$MANAGER_WIDGET/Common/API/Plugin.js'></script>
Also to use Deferred objects within the code jQuery 1.9.1 is included:
<script type='text/javascript' src='app/javascript/jquery-1.9.1.js' ></script>
My problem arises from the fact, that the SAMSUNG APIs apparently load whatever it is they are loading in the display's backend, however one of the things they load is their own jQuery version, which is 1.4.2.
The situation is such that I cannot say which version will be loaded at what point. I can start up the display five times having done no changes to the code and will get two times 1.4.2 and three times 1.9.1 or once 1.4.2 and four times 1.9.1 or any other possible order. I suspect this being due to the display's API able to run multithreading, so that the JS application and the API run independently from one another.
So I took a look at the noConflict method, however am unsure how to go about this problem using it.
As said, the application is large. It uses jQuery in various places. So doing something like
jQuery1_9_1 = $.noConflict(true);
after loading our jQuery version is rather unfeasible, since this will cost a large amount of time to fix.
However so far I have found no way to reliably unbind version 1.4.2 from $, because I do not load it, but the display's API does and it is not clear as to when it is loaded.
I hope this question is not redundant and someone has an idea how to go about it.
Im up with a question..
I have my main file, the index.php, and inside of index im importing jquery 2.0.3.
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
The main problem is because i have other file in the server, it is called website.php, and inside i have imported jquery 1.8.3.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
So, if i take off the second librarie, the all site works correctly, but one plugin doesn't work, but if i take out the second librarie, the whole site works on but the other plugin dont!
Sorry for bad english, but the problem is because of the jquery conflict..
I already made some research, and use the jQuery.noConflict(), but still doesn't work!
Thanks in advance!
First the difference between jQuery 1 and 2 is the compatibility with older versions of Internet Explorer. So the best guess is, to use a CURRENT jQuery v1 version (1.11 at the moment).
However jQuery has changed a lot in version 1.9 which is probably the reason your old plugin fails if you remove 1.8. The only viable solution would be to update that plugin or change to another one if yours is not available anymore.
It is NEVER a good idea to use two versions of the same library in one project.
Use Jquery migrate plugin and migrate to 2.0.3 and then you can remove jquery 1.8.3.
Heres the link for migration
its very simple and easy
I have an issue on using JQuery versions:
Which JQuery version is suitable for all functions of jquery.
In my website designing:
I use the following js version for Contact Form validation:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js">
</script>
I use the following js version for page smooth scroll:
<script type="text/javascript" src="script/jquery-2.1.1.min.js"></script>
If I use both: The contact form is works, scrolling not works. What shall I do for this?
You just need one of your script statements as they both doing the same thing.
The difference is just if you want to load the script from your server or the google server.
Both versions are doing what you want. I would suggest to use the latest Version. If you want to support older browser (like IE8) you have to use 1.x, otherwise use 2.x
I thank to Stack Overflow Team and all of you first,
I found a solution to solve the issue.
Jquery's .noConflict();
<script type="text/javascript" src="script/jquery-2.1.1.min.js"></script>
<script>
var jq211 = jQuery.noConflict();
</script>
<script type="text/javascript" src="script/jquery-2.0.min.js"></script>
<script>
var jq20 = jQuery.noConflict();
</script>
I followed the function. Now no issues in using the versions of Jquery.
jQuery's APIs change over time, and jQuery is not 100% back compatible. I recommend trying a recent version of jQuery (2.1.x, or 1.11.x if you need to support old browsers) along with jQuery Migrate, which brings some old jQuery features back for migration purposes. If that still doesn't work, update your jQuery plugins and ensure that your third and first party code are both using compatible versions of jQuery.
If you can't fix it otherwise, you should look into using the .noConflict() method. If you do that, you can use several different versions of jQuery in one page.
Please refer to http://forum.jquery.com/topic/multiple-versions-of-jquery-on-the-same-page for more info :)
When I load jquery using:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
it works on IE9, firefox, chrome, safari but not IE8. I tried the developer/debugger tools but still don't understand why this is an issue.
This is the character code jquery supposedly has error on: 32039.
On that line there is such function:
G=function(a){
var b=F.exec(a);
b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));
return b
}
Anyone came across this issue as well?
The site is http://www.kanersan.com
I am not calling jquery before it is loaded and I'm loading it inside the head tag.
This is a bug in jQuery 1.7.1 when used with SyntaxHighlighter
http://bugs.jquery.com/ticket/10961
So you have to upgrade jQuery to 1.7.2 and everything will be working fine.
try to folow some steps:-
1.jQuery is not being loaded, this is not likely specific to IE8. Check the path on your jQuery include. statement. Or better yet,.. TRy to give direct path.
2.May be because of compatibility issue.. Try to give compatibility solutions..
Things worked in IE6, Firefox, and IE8 running in IE7 compatibility mode; but not in 'normal' IE8. My solution was to put this code in the header
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
As to why jquery isn't working in IE8 I'm unclear.
3.Try to load your jquery on window load.
4.Try to define your jquery file in top..
5.Very important point - try to check your html and jquery code.. IE is very sensetive for code.. so cross check your Html code ,... Is everything is fine..
6.Changing browser sercurity level to allow executing external javascript code.
7.Replicate javascript framwork..
May this will help You !!!!!!!!1
Some things worth trying...
Remove type="text/javascript" like so: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
Make sure you reference jquery.min.js before your javascript code that uses jQuery.
Most probably, the above suggestions will not help, but since the problem sounds IE8 specific, I believe it's worth a try doing some trivial things that might solve the problem.
here is the url why it the autocomplete is not working?
http://code.chaabee.com/mahmed/jobber2/
please help :S
autocomplete code is in footer there..
You're including jQuery UI 1.7.2 and 1.8.7 in the page, this is causing some issues (mainly a .zIndex() plugin method error)...I'd remove this jQuery UI 1.7.2 reference to fix this up:
<script src="http://code.chaabee.com/mahmed/jobber2/js/jquery-ui.min.js" type="text/javascript"></script>
Also note that the jQuery 1.8.7 you're including works a bit better (more optimized) with jQuery 1.4+, same with validation, etc...if you can update I'd recommend doing to, to jQuery 1.4.4 and jQuery validation 1.7.
I am getting, 'There should be no direct access to this script!', obviously the script is looking for 'POST' request and not 'GET' request.