- Posts: 13
- Thank you received: 0
Responsive enu disappearing on Desktop and Mobile
-
berek
Inactive member - Topic Author
- New Member
Less
More
10 years 3 months ago #41844
by berek
After changing code in responsive_menu.js to:
menu stays on it's position and works fine (for now )
But scroll to top button stopped working and clicking on it does nothing.
Any clues?
Replied by berek on topic Responsive menu disappearing on Desktop and Mobile
Warning: Spoiler!
Where is edit post button?
After changing code in responsive_menu.js to:
Code:
function menutransform(){
var topMenuContainerWidth = jQuery("div.cell").has("ul.nav").innerWidth();
var topMenuWidth = jQuery("body").innerWidth();
// jQuery("ul.nav").css("min-width",topMenuWidth);
if(topMenuWidth < 481) {
jQuery(".tinynav").css("display","block");
jQuery("ul.nav").css("display","none");
jQuery("ul.nav").tinyNav({
active: 'current', // String: Set the "active" class
header: 'Menu', // String: Specify text for "header" and show header instead of the active item
});
$.fn.quickChange = function(handler) {
return this.each(function() {
var self = this;
self.qcindex = self.selectedIndex;
var interval;
function handleChange() {
if (self.selectedIndex != self.qcindex) {
self.qcindex = self.selectedIndex;
handler.apply(self);
}
}
$(self).focus(function() {
interval = setInterval(handleChange, 100);
}).blur(function() { window.clearInterval(interval); })
.change(handleChange); //also wire the change event in case the interval technique isn't supported (chrome on android)
});
};
}else{
jQuery(".tinynav").css("display","none");
jQuery("ul.nav").css("display","block");
}
}
jQuery(function(){
menutransform();
//jQuery(window).resize(menutransform);
jQuery(window).resize(function(){
jQuery(".tinynav").remove();
menutransform();
});
});
jQuery(document).ready(function(){
$("SELECT.tinynav").quickChange(function() {
jQuery(this).trigger('change');
});
});
menu stays on it's position and works fine (for now )
But scroll to top button stopped working and clicking on it does nothing.
Any clues?
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
10 years 3 months ago #41849
by ivan.milic
Replied by ivan.milic on topic Responsive menu disappearing on Desktop and Mobile
Send link so we could check
Please Log in to join the conversation.
-
berek
Inactive member - Topic Author
- New Member
Less
More
- Posts: 13
- Thank you received: 0
10 years 3 months ago #41865
by berek
Replied by berek on topic Responsive menu disappearing on Desktop and Mobile
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
10 years 3 months ago #41868
by ivan.milic
Replied by ivan.milic on topic Responsive menu disappearing on Desktop and Mobile
Open:
templates/hot_kindergarten/js/responsive_menu.js
this code:
jQuery(document).ready(function(){
$("SELECT.tinynav").quickChange(function() {
jQuery(this).trigger('change');
});
});
will not do because SELECT.tinynav does not always exist when that code is executed.
try:
jQuery(document).ready(function(){
if($("SELECT.tinynav")[0]){
$("SELECT.tinynav").quickChange(function() {
jQuery(this).trigger('change');
});
}
});
but I dough it will do any good.
templates/hot_kindergarten/js/responsive_menu.js
this code:
jQuery(document).ready(function(){
$("SELECT.tinynav").quickChange(function() {
jQuery(this).trigger('change');
});
});
will not do because SELECT.tinynav does not always exist when that code is executed.
try:
jQuery(document).ready(function(){
if($("SELECT.tinynav")[0]){
$("SELECT.tinynav").quickChange(function() {
jQuery(this).trigger('change');
});
}
});
but I dough it will do any good.
Please Log in to join the conversation.
-
berek
Inactive member - Topic Author
- New Member
Less
More
- Posts: 13
- Thank you received: 0
10 years 3 months ago #41906
by berek
Replied by berek on topic Responsive menu disappearing on Desktop and Mobile
Sadly it didn't help. I've figured out that the same problem exists in other templates so would you release any patch for that?
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
10 years 3 months ago #41913
by ivan.milic
Replied by ivan.milic on topic Responsive menu disappearing on Desktop and Mobile
Did you add :
jQuery(document).ready(function(){
$("SELECT.tinynav").quickChange(function() {
jQuery(this).trigger('change');
});
});
by yourself? What was goal - maybe there is right solution
jQuery(document).ready(function(){
$("SELECT.tinynav").quickChange(function() {
jQuery(this).trigger('change');
});
});
by yourself? What was goal - maybe there is right solution
Please Log in to join the conversation.
Time to create page: 0.094 seconds