jquery autocomplete | what's wrong with it - javascript

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.

Related

jquery version conflict in 1.8 to 1.11

i want to use a plugin in my website. but in website already used 1.8 version of jQuery and my plugin is 1.11 version. now its conflicting. please tell me what should i do. there is some types of error message come up
it says $. something is undefined
and it also says $.() is not a function.
so that it the problem please anybody help me.
You should update your website to use v1.11.2 and only load that version. There are virtually no API-breaking changes from v1.8 to v1.11, the only thing that was actually removed was the toggle(function,function) event hookup (not the toggle show/hide function, which is still there).
There were deprecations:
In 1.8
In 1.9
In 1.10
...so best to check those lists and see if you're using any of those, but they haven't been removed yet (with the exception I mentioned above).
jQuery is mostly backwards compatible. Instead of loading v1.8 and v1.11, just load v1.11. You're plugin will probably still work.

Some Problems About Jquery Libraries

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

Which JQuery version is suitable for all jquery functions?

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 :)

Magento add to cart doesnt work

Hello i have a problem with my add to cart button in my magento theme. i have changed all theme, but it doesnt work, please any can help me? i see in the console the error:
Uncaught TypeError: Cannot read property 'submit' of undefined gabinete-ice-2x24w-magg.html:220
onclick
but too appear error in my prototype.js im put here the file prototype.js, and here the live link http://masluz.panamerik.net/gabinete-ice-2x24w-magg.html i hope can help me guys thanks!
PROTOTYPE.JS LINK:
http://masluz.panamerik.net/js/prototype/prototype.js
When i go to checkout page to place the order have error too with prototype.js whats happend with this?
You are callling two copies of jQuery, this will cause all sorts of issues with Magento.
<script type="text/javascript" src="http://masluz.panamerik.net/js/megamenu/jquery-1-7-2.js"></script>
<script type="text/javascript" src="http://masluz.panamerik.net/js/iwd/all/jquery-1.10.2.min.js"></script>
You are using multiple version of jquery (1.7.2, 1. 1.10.2 and lastly 1.3.2). Since the last loaded version is 1.3.2 it is very much outdated and will not support many functions.
Also, you are loading jquery.noconflict file before your last jquery include, hence the errors are most likely because of the conflict issues.
You can try removing all other version of jquery and load noconflict.js file at the end of all the scripts.

why Fancy box 1.3.4 if used along with jquery 1.8.3 results in wrong allignment?

I am using fancybox to display some message and on the same page I tried to add a new JavaScript widget which require jquery 1.4.4 or higher versions.
I used jquery 1.8.3 and after adding this jquery file, alignment or positioning of the box is going wrong. If I don't use latest jquery file, JS widget will not work.
Please let me know how to solve this issue.

Categories

Resources