Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7504567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:37:02+00:00 2026-05-29T21:37:02+00:00

Old title: Included PHP doesn’t work with JQuery and IE in a function as

  • 0

Old title: Included PHP doesn’t work with JQuery and IE in a function as expected

I have these two function:

First:

/* dynamic menue */
$("#wrapper div").not(":first").hide();
$("#nav p").click(function () {  
$('#wrapper div').eq($(this).index()).show().siblings().hide();
});

Second:

 var menue = function (menue) {
 if ($(window).width() < 680) {
    $("#nav").hide();
    $("#wrapper div").show();
 } else  {
    $("#nav").show();
    $("#wrapper div").not(":first").hide();
 }
};
$(document).ready(menue);
$(window).resize(menue);

​The first function works well and the second makes sure that all content is shown without the menue if the window size is beyond 680px otherwise it will show the normal state. Everything works fine in all browsers.

I made up a fiddle for visualisation: http://jsfiddle.net/TFeWY/

However this doesn’t work in IE as expected with this setup: The div content is generated with php. In this state I only see the first div in IE and can’t switch to the other but resize works well. However if I change the php content with html it all works properly again. More interesting: If I leave the php untouched an just remove the else statement it also works.

So far I couldn’t figure out weather it’s the php content (what I don’t think) or the hide() command in context of the php content.

Is something wrong in the function for IE? (Tested in IE8)

Edit:

If I remove the $(window).resize(menue); it also works. So it must be something wrong with the function itself?

I found out that the window.resize function is always trigged in IE 8, that’s the reason why I can’t see the other divs.

How can I do something about that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:37:03+00:00Added an answer on May 29, 2026 at 9:37 pm

    Ok, I finally found an answer:

    Actually here is a post to my question which describes what is happening here: window.resize event firing in Internet Explorer

    Check out this updated fiddle in IE 8. It doesn’t work as I described cause the resize is triggered:

    http://jsfiddle.net/TFeWY/1/

    Now you could work with the given answer of the post mentioned above.

    Or here is a fix of a friend of mine which I use now:

    http://jsfiddle.net/TFeWY/2/

    A very interesting solution I think.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this jQuery simple code: <script type=text/javascript> <!-- jQuery(function(){ jQuery('#old_thumb').click(function(){ $(this).val($(this).attr('title')); $('#sf').val('2'); $('#add_new_event').submit();
I have inherited an old crusty PHP application , and I'd like to refactor
I have a Sharepoint 2007 site that is displaying the old/original title in the
as stated in the title, I want to have my old C++ library working
In My Website I have main urls such as h**p://www.sy-stu.com/stu/music.php The Title of the
So the title is somewhat misleading... I'll keep this simple: I'm comparing these two
const char* title = old title; HWND hwnd = FindWindow(title, title); SetWindowText(hwnd, new title);
Well, the title's pretty much it: if I sat a non-techie/my mum/twelve-year old boy/cocker
Scenario: old legacy code in rpg have to consume data from a new web
Age old question! When you have finished developing and testing your ASP.Net web application,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.