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

  • Home
  • SEARCH
  • 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 6121841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:49:47+00:00 2026-05-23T15:49:47+00:00

<div id=a></div> if($(#a).is(‘:empty’) ) alert(empty); In IE8, it shows alert but Mozila 3.6 and

  • 0
<div id="a"></div>

if($("#a").is(':empty') )
      alert("empty");

In IE8, it shows alert but Mozila 3.6 and Opera 11 do not show the alert. Why?

Answer:

if(!$.trim( $("#a").html() ) )
   alert("empty");

this code run in ie and mozila

  • 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-23T15:49:48+00:00Added an answer on May 23, 2026 at 3:49 pm

    Your code is valid and should work in those browsers. I tested it in FireFox and Chrome and it works.

    Verify that you do not have any other elements in your page that also have an id of a. Most browsers compliant with web standards correctly refuse to acknowledge any duplicated elements and often it causes JavaScripts to fail due to errors.

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

Sidebar

Related Questions

My div is scrollable, using overflow: auto. But it shows a nasty scrollbar that
Div height is not support in below code <html> <head> <meta http-equiv=Content-Type content=text/html; charset=windows-1252>
I have a following div structure <div id=wrapper> <div id=header> <div id=storeFinder> /* html
$('div.box').html(hello) puts the word hello inside all my div's of class 'box'. They all
My div is closing itself. <html><head><title></title> <script type=text/javascript charset=utf-8 src=jquery-1.7.min.js></script> <script> $(document).ready(function(){ $(#wrapper).append( '<div
i have div's wrapped under div's my html code is. <div id=content-row> <div id=left-box>
$('div#searchResult > div#searchResultItem > div#item').hover(function() { alert($(this).text()); }); Hi guys. Im doing a quick
The div tag is not working inside table definition: <table> <tr></tr> <div id=choice><tr> <td>-------</td>
The DIV elements height is not growing even after I set the height property
DIV Tag is not displaying according to the screen size. I am using jquery

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.