I have a page (this one actually http://gtsturism.agencia.ro/) where the client requested to use a theme from themefuse (which is quite difficult to modify).
However the theme uses jQuery 1.8.3 and I have developed a new section (the tuner down below) that requires v. 1.10.2 in order to function properly.
The problem is the same with jQuery UI. The idea is that if I import the newer version o jQuery the theme functions will not work (eg: the menu, sliders, popus etc.). If I rely on the theme jQuery and jQuery ui however, my component is not going to work at all.
The reason why I am here is because the client did not specify from the beginning what he was going to do with the component and the framework requirements.
I am looking for some kind of a workaround that will not direct me into rewriting the whole widget of the website.
Please note that on the top link the tuner is working right now (not the submit but the buttons and sliders).
Thank you for your time.
UPDATE #1: jQuery UI main issue
I have managed to make some of the aspects work, but the theme jQuery UI is highly modified and in special the sliders that initiate using this piece of code:
var OPTIONS = {
settings: {
from: 1,
to: 10,
step: 1,
smooth: true,
limits: true,
round: 0,
format: { format: "#,##0.##" },
value: "5;7",
dimension: ""
},
className: "jslider",
selector: ".jslider-",
template: tmpl(
'<span class="<%=className%>">' +
'<table><tr><td>' +
'<div class="<%=className%>-bg">' +
'<i class="l"></i><i class="r"></i>' +
'<i class="v"></i>' +
'</div>' +
'<div class="<%=className%>-pointer"></div>' +
'<div class="<%=className%>-pointer <%=className%>-pointer-to"></div>' +
'<div class="<%=className%>-label"><span><%=settings.from%></span></div>' +
'<div class="<%=className%>-label <%=className%>-label-to"><%=settings.dimension%><span><%=settings.to%></span></div>' +
'<div class="<%=className%>-value"><%=settings.dimension%><span></span></div>' +
'<div class="<%=className%>-value <%=className%>-value-to"><%=settings.dimension%><span></span></div>' +
'<div class="<%=className%>-scale"><%=scale%></div>'+
'</td></tr></table>' +
'</span>'
)
};
The full theme jQuery UI slider can be found here http://jsfiddle.net/AEK8p/
So what I need is some other way to initiate my sliders since the theme makes it like this and uses the keyword slider :
jQuery(document).ready(function() {
// Price Range Input
jQuery("#range_field_short_latest_price_range").slider({
from: 90,
to: 2490,
smooth: true,
scale: ["$90","$2.5k"],
skin: "round_green",
limits: false,
heterogeneity: [],
dimension: '$'
});
});
So what I was thinking was to rename the constructor in something like "customSlider" in the fiddle you see up in my text, but I do not think that this will suffice.
UPDATE #2: jQuery UI - possible solution - use alternative UI framework
So, after a lot of struggle I found a partial solution to this. So I have rewritten the sliders code using a different slider plugin for jQuery, that you can find here http://refreshless.com/nouislider/.
This way I avoid any type of conflict with the theme and I can keep the Jq version that comes with that.
The conclusion is that there is a very big pain to use 2 or more versions of jQuery, jQuery ui or other libraries that overwrite themselves due to the fact that the dimension of the overlapping is uncontrollable (like in this modified theme that my client bought from themefuse).
Thank you all for your contribution that led finally to this solution. It would have probably been more time consuming without your help.