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 7032793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:58:51+00:00 2026-05-28T00:58:51+00:00

I have a code like this: $(function() { if ($(div#ProductDetail_ProductDetails_div2 table tbody tr).text().trim() ==

  • 0

I have a code like this:

$(function() {
if ($("div#ProductDetail_ProductDetails_div2 table tbody tr").text().trim() == '') {
    $("div#ProductDetail_ProductDetails_div2").css("border", "0px");
    $("div#ProductDetail_ProductDetails_div").css({'border-bottom-left-radius' : '5px', '-moz-border-bottom-left-radius' : '5px', '-webkit-border-bottom-left-radius' : '5px', 'border-bottom-right-radius' : '5px', '-moz-border-bottom-right-radius' : '5px', '-webkit-border-bottom-right-radius' : '5px'});
}
});

Basically, it says if there is no content nested inside the <tr> , run some CSS modifications…

However, in IE8’s debug console it says on this line if ($("div#ProductDetail_ProductDetails_div2 table tbody tr").text().trim() == '') { “object does not support this property or method” I have no clue what that means.

This is causing some problems with the other jQuery on the site. I know that when I comment it out, the site works perfectly. Can anybody tell me what’s wrong the code that making IE complain? Thanks.

  • 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-28T00:58:52+00:00Added an answer on May 28, 2026 at 12:58 am

    jquery trim function is like this

    jQuery.trim( str )
    

    and you probably need to get the td text value to compare.

    Change it like this

    if ($.trim($("div#ProductDetail_ProductDetails_div2 table tbody tr td:first").text())=="")
    {
     //  Rest of the code
    

    http://api.jquery.com/jQuery.trim/

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

Sidebar

Related Questions

I have this code: var originalBorder = container.css("border"); container.hover(function(event) { event.stopPropagation(); $(this).css("border", "1px solid
I have a code like this - <div id=doc> <div id=main> <table id=vtier#1> <tr>
I have a HTML code like this: <pre><div class=post style=border-width:1px;border-style:solid> <div class=userpic style=width:70px;float:left> <img
Say I have this mockup-code: button.click(function(){generateForm();} function generateForm(){ div.append(<input type='text' id='x'>); } I will
i have html code block like this <div id=some-div> <a href=# class=link-click>some link text</a>
I have a code like this one: $('div.widgetDroppable').droppable({ accept: 'li.widget', drop: function(event, ui) {
I have some jquery code inserting a div like this function popUpBox(){ $(.openBox).click(function(){ var
I have code like this: $(document).ready(function() { $(div #covert, div #coverb).height($(window).height() / 2 +
I have code like this var MyObj = { f1 : function(o){ o.onmousedown =
If I have a chunk of code like this: .hover( function () { hoverState($(#navbar

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.