Jquery problem when adjusting browser window

Asked

Viewed 67 times

1

![insert the image description here][1]I am developing a website and I have a problem adjusting the window. The problem is in the site menu (Nav), when I’m adjusting the window to smaller it reaches a point where the menu text disappears. The problem is in jquery 1.8.0.min because when I remove the page include I can adjust to the will that does not affect anything. I want the site to be non-responsive.

  • Diogo without putting your code can not know what the problem... Have the site online? can put CSS, HTML and Javascript relevant to the problem?

  • Inflizmente is not yet online.

  • Menu example: a | b | c | d | when the normal browser window is open. Then when adjusting the window to smaller to put up window side by side with another the menu a| b| c| d does not appear only the header(Nav).

  • You have to ask [Edit] the question to add HTML. If the formatting is wrong we will help. You can also join a jsFiddle to recreate the problem in an environment where we can test.

  • Good, I see the image. You can put the code (HTML, JS, CSS) in text also in the body of the question?

  • The java script is jquery 1.8.0.min. js

  • No more Javascript code inside the page than jQuery 1.8? okay, so just put the HTML and CSS in that menu.

  • I want to know where part of this js is the function that allows adjusting the window without changing the content of the site

  • Diogo, if you only upload the jQuery library and no longer have Javascript/jQuery on your site then jQuery alone does nothing. It’s the same as if it wasn’t there. Hence I ask for your HTML and CSS to explain the problem and give examples.

  • OK Diogo, now CSS is missing. For now I only see this from your page: http://jsfiddle.net/nndc0d75/

  • Sergio, see the online site had the oleola.comuf.com Metelo

Show 6 more comments

1 answer

0


Ok, so on your site you have besides jQuery two files. One called functions.js where it has some code for window resize and other "jQuery Flexslider".

In addition has side images with position: absolute; which will inevitably overlap with the text... The CSS file is also quite large: http://oleola.comuf.com/css/style.css

I think I’d better start a new page to learn step-by-step...

However and to answer your question, within functions.js there is a function called in several parts of the code, the function mobile(). In this function he hides the ul from the menu if the screen width is less than 750px with $('#navigation ul').hide().

The function in question is:

function mobile() {
    var winW = $(window).width();
    if (winW > 750) {
        $('#navigation ul').show()  
    }else{
        $('#navigation ul').hide()
        $('#navigation a.nav-btn span.arr').removeClass('active');
    }
}

If you don’t know how to remove this function from your code without generating errors, I suggest using only:

function mobile() {
    return false;
}

But again I say I should start from the beginning, to learn step-by-step.

  • It worked perfectly thank you, will it help me fix the images on the side?

  • @Diogo help/help yes. Ask a new question and explain what is happening and what you wanted to happen. Remember that there is already a lot of content here on the site that can solve your problem. Take a look. If not find ask new question.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.