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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:12:35+00:00 2026-05-26T10:12:35+00:00

Here is a funny little issue i’ve come across with dynamically setting the class

  • 0

Here is a funny little issue i’ve come across with
dynamically setting the class for a array of divs.

Using Knockout.js i’m assigning the classes used via the ‘attr’ binding.

This works well in all browsers i’ve tested except IE-7 (Not worried about IE-6 etc)

I have an jsfiddle example highlighting the issue here

In the example the static (top row) should match the bottom one (ko generated)
In IE-7 i’m just seeing the broadest css selector color (Silver)

  • 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-26T10:12:35+00:00Added an answer on May 26, 2026 at 10:12 am

    IE7 requires that you set className instead of class.

    For instance, this works in IE7 and other browsers: http://jsfiddle.net/thirtydot/VVuGh/14/

    <div data-bind='attr: { "class": classes, "className": classes }'></div>
    

    However, support for this IE7 quirk should ideally not be in your HTML. Inside knockout.js would be a better place, though I know nothing about the library to be able to make such a recommendation.

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

Sidebar

Related Questions

i have come into quite a funny hole here. i can't seem to be
This is rather a funny problem I have ever come across, I have a
So, here's a funny little programming challenge. I was writing a quick method to
I have a image here http://power.itp.ac.cn/~jmyang/funny/fun4.jpg and I want to display it in my
Here is the issue I am having: I have a large query that needs
I have a funny thing going on with my local dev setup. Using codeigniter
Here's the code: public interface IValidator<T> { bool IsValid(T obj); } public class OrderValidator:
I find this as a funny little problem. I think the reason lies behind
ok am having a funny problem here, scenario is like this: Intent i of
Hey all, Here's a funny one. I have two ViewControllers: first one (fires on

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.