Changing a data attribute in Safari, but the screen does not redraw to new CSS style [closed]
Asked Answered
N

1

2

In my website I have created a content and navigation element.

Once the 'Next' button is clicked my Javascript will interpret the next page and change a 'data-progress' attribute on it's parent node. My CSS contains several selectors

.content[data-progress="0"] > .progressNavigationHolder > .progressNavigation > div:nth-child(1)

and

.content[data-progress="0"] > .progressPages > ul

so that the tab changes to a pressed state, and the page's margin-left will be incremented by 480px.

This all works great (if a bit confusing to write and explain), whereby the code will change the data-progress to the incremented value as well as the CSS selectors link to the correct node. However, this is only true as far as the inspector is concerned, but in reality, the screen/viewport is not updated to show this change.

This works great in Chrome but for some reason Safari does not want to show it.

If it is any help I am running Safari 5.1.7 on Windows.

Nidify answered 7/6, 2012 at 14:39 Comment(1)
I can't give a link, as the site is closed and the only people who can access it have to have a valid login. I was more interested in whether people knew of this issue/bug.Nidify
N
3

Ok, so to overcome this issue, I changed a class of a tag in my Javascript. It seems to be force redrawing the screen.

Nidify answered 7/6, 2012 at 16:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.