Does any of standard themes supports jQery 1.9+ ? Because I'm having big issue with it, as I try to use Twitter bootstrap elements in themes. I need jQuery 1.9 at least for it.
jQuery 1.9+ support in vBulletin.
Collapse
X
-
vB5 uses jQuery 1.7.2 which is too far behind the latest version 1.11.3.
If you replace the old one with 1.11.3, it might break some scripts that use deprecated or modified jQuery methods.
Starting jQuery 1.9.0, there were major changes that may break sites. That's why jQuery provided jQuery migrate plugin to simplify transition from older versions.
There is no straightforward to upgrade jQuery in vB5 but to do this without modifying templates and be safe from future upgrades, do the following:
1. Remove the jQuery src at the bottom of the page by replacing this:
src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"
with an empty string
You do this in AdminCP > Styles & Themes (or Style & Templates depending on your vB5 version) > Replacement Variable Manager.
Click Add New Replacement Variable for the target style/theme.
Fill out the form with the following info.
Search for Text:
src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"
Replace with Text:
(leave it empty)
Repeat steps for all the themes/styles you are using.
2. Then create a template hook in header_head hook location with this template:
Code:<script src="//code.jquery.com/jquery-1.11.3.min.js"></script> <script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
For steps on how to create a template hook, see one of the mods in my signature for similar instructions.
Note: This is untested. Let me know if this works or not.Last edited by glennrocksvb; Mon 19 Oct '15, 9:50am. -
Vote here to get it updated and tested - http://tracker.vbulletin.com/browse/VBV-12035Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 APIComment
-
Glenn Vergara Doesn't work. And I think you had over-engineered the solution. To replace jQuery version it is enough, to replace setting: "Use Remote jQuery" and "Custom Remote jQuery Path" without replacement variables. I've tested both ways. And now about the errors:
jQuery migrate isn't enough, because scripts are not strict written.
Code:a.curCSS is not a function
Code:jQuery.curCSS = jQuery.css;
Code:input[name=xxx]
Code:input[name='xxx']
So... vBulletin is tightly bound to jQuery 1.7.2 and there is no easy way to change it. I've been looking for any template on the internet that allows newer jQuery to be used, but didn't found any. Well I think that is another nail to the coffin for vBulletin.
Wayne Luke Thank for guiding me, but I think this will take too long for me, to be used.Comment
-
You can fix the selectBox plugin by overriding the .selectBox() method. This will skip the plugin and all your dropdowns will use the native select and should work as is.
Code:<script> $.fn.selectBox = function () { return this; }; </script>
For the attribute selectors without quotes, that should work. I don't know why you're having an issue on this.
But after all these, you will still have issues with jQuery UI. You also need to upgrade jQuery UI 1.8.14 to 1.11.4. The only way to do that unfortunately is to edit the footer-rollup js file and replace the jQuery UI block with the latest version. You would have to do this on every upgrade.
Comment
-
any update on the jquery version upgrade?adktramping ~ my happy place.
"Whoever said practice makes perfect was an idiot. Humans can't be perfect because we're not machines." ~ Sam Gardner.
Vote for your favorite feature requests and the bugs you want to see fixed.Comment
-
Translations provided by Google.
Wayne Luke
The Rabid Badger - a vBulletin Cloud demonstration site.
vBulletin 5 API👍 1Comment
Related Topics
Collapse
-
by NLP-erIn vb4 we had THIS_SCRIPT - it was working great. Not it is gone. The replacement is pageid, BUT:
1. It is not easy to get (if it is please give me the method to get it)
2. It is not alvays...-
Channel: Support Issues & Questions
-
-
by glennrocksvbI know fixing responsive layout issues is ongoing for vB5. But I'm not sure if this is on their plans to fix.
vB5 dynamically adds via Javascript the CSS classes "l-desktop", "l-small"...-
Channel: vBulletin 5 Connect Feedback
-
-
by NLP-erWhich code in vB5 handles {vb:url}?
Which code in vB5 creates URLs - can I hook there?
Is there any way to globally change vBulletin URL by hooks? As I see vB code is taking 'frontendurl'...-
Channel: Support Issues & Questions
-
-
by IcEWoLFhttp://www.dragonbyte-tech.com/blogs...rs-corner-287/
I thought I would share this with you guys for the people...-
Channel: vBulletin 5 Connect Feedback
-
-
by discoverxs3Has anyone found a way to make auto links* work in VB5 ?
And we are not talking about monetization option offered from VigLink.
Any ideas on this?
...-
Channel: vBulletin 5 Connect Feedback
-
Comment