My issue is. I have jQueryUI in version 1.8.5 and lot and a lot of legacy source code in a project. In legacy code it happens that there is 3ple times registred plugin autocomplete for jquery. However jQueryUI is registring the very same plugin. So when I type into my javascript:
$('#some_id').autocomplete();
It's not actually a jQueryUI.
Any chance to explicit choose UI?
I tried such approach:
jQuery.fn.myautocomplete = jQuery.ui.autocomplete
And then to use in my code:
$('#some_id').myautocomplete();
But this does not work. (Well it was a blind shoot so I did not expect to much.)
Any suggestion how to workaround the problem.
P.S.
Legacy code is blessed by the Pope and cannot be removed for next year or so.
You can:
download jquery.ui without autocomplete
change jquery.ui source
change old plugin source
Related
I'm making this post as I've been having this issue, and I'd like to make light of it. Perhaps others are having it, or can say whether my situation is a unique case. I recently downloaded the new version of jQuery (3.0.0) and linked it to a current project I'm working on. My Bootstrap dropdown / collapsing navbar would NOT work until I switch to an older version of Jquery (1.12.4.)
Has anyone else noticed something like this or had a similar issue?
Bootstrap 3 is not compatible with jQuery 3. You can use the latest v2 jquery though.
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.
In IE 6/7/8 a <select> element, if given a defined width, does not automatically expand once opened. With browser sniffing (jQuery example was to use $.browser.msie and $.browser.version) I could detect the current browser to a degree of certainty and, for the relevant browsers add in a custom handler for selects.
In jQuery 1.9 the $.browser object has been removed. I am still using an older version in production, and am able to browser sniff and show auto-expanding select menus accordingly; However, this isn't a long term solution if we're going to keep up with the later releases of jQuery.
I've had a look through the properties of select via for(var i in document.createElement('select')) { ... } but can't see anything obvious relating to whether or not the menu will automatically expand.
Is there such a thing? Ideally, I'm looking for a vanilla solution that doesn't require browser sniffing. An if(!property in document.createElement('select')) { ... } would be fantastic.
[Edit / Addition] I know about jQuery migrate and understand it will probably tide us over. I'm not overly keen to load in more things for one (at the moment) tiny inconvenience.
From the jQuery API of jQuery.browser:
We recommend against using this property; please try to use feature
detection instead (see jQuery.support). jQuery.browser may be moved to
a plugin in a future release of jQuery.
I investigated and found the jQuery Migrate Plugin which has the $.browser feature, the code is available at github.
I'm looking for some combination of a plugin or clever programming technique that will allow me to have a context-style menu in jQuery but rather than actually triggering it from a right-click, I'd like to be able to have it triggered from a button that can potentially move to different locations on my window. I can handle the part of the button itself moving without much trouble. My requirements are:
It should be compatible with jQuery UI 1.8 and my custom themeroller-generated theme
It needs to be relocatable
I either need to have it execute a callback when an element is selected, or have it honor the href on any a tags that make up the menu elements
I looked at Selectmenu and it's close, but it seems to want to always show the currently selected item, which is not quite what I want. Also I had to hack around it in an ugly way to make it relocate properly.
This blog post is also pretty close but the jsEvent.clientX and jsEvent.clientY don't put the dialog in the right place and I'm a little stuck as to what to do about that. Also I don't really want the options to be buttons. The menu-ish plugins have them looking right.
This plugin here is pretty much exactly what I want (I'd have to add the bit about the button, but it doesn't look too hard). But that requires jQuery UI 1.9.
Any thoughts? It may be that this is just such a rare requirement that I have to roll my own, but somehow that seems surprising and I feel like I might be missing something.
I like this plugin. It seems that is more compatible than jQueryUI-contextmenu.
Is a fork of jQueryUI-contextmenu actually
jQuery-contextMenu
I liked it because it has more examples, and it says that only use one footprint in memory so it consume less resources in comparison to others. Works with +jquery 1.6 and don't necessarily need html markup,
The menu plugin you mentioned last seems to work fine with jQuery UI 1.8.x, but not jQuery UI 1.7.x.
jQ-UI 1.8.7: http://jsfiddle.net/william/xxGUW/
jQ-UI 1.8.9: http://jsfiddle.net/william/xxGUW/1/
jQ-UI 1.8.14: http://jsfiddle.net/william/xxGUW/2/
jQ-UI 1.7.2 (broken): http://jsfiddle.net/william/xxGUW/3/
I'm using CKEditor (currently using ver. 3.4.1 - I can upgrade if it's necessary) and I'm missing a possibility to use the <code> tag, either from the Format dropdown or via a button on the toolbar.
I couldn't find a plugin that would make this possible. I have also no experience or knowledge of how to write my own plugin for that.
Do you know of a plugin that might help me enable the "code" button/format (wrapping selected text into <code> tags)? If there is none, I would appreciate if you directed me to online resources about CKEditor plugin development (some sort of tutorial explaining the bare basics).
In case it's useful, my site's using Drupal 6.19, CKEditor module, CKEditor 3.4.1. As for plugin development tutorials, I have already found this, but most of it seems to beyond my grasp.
I solved with this ckeditor plugin:
http://code.google.com/p/ckeditor-syntaxhighlight/
It's also compatible with the jquery plugin SyntaxHighlighter
http://alexgorbatchev.com/SyntaxHighlighter/
Try https://ckeditor.com/cke4/addon/codeTag
config.extraPlugins = 'codeTag';
No additional dependencies.
Get wysiwyg
Browse configuration>wysiwyg
...
Enable the 'source' button.