Button in repeater coded to disable when no document is in data set, but no hover interaction happens now

Before you read the post, please be aware that I am in no way a coder, and this is the first piece of code that has worked (partially)

I’m working with a client that uses a repeater to upload 2 documents (one is a digital version designed like a magazine, and the other a print version which is just text).

For the next 2 weeks, they are not going to be able to create the digital copy, so this won’t appear in the database. I’ve written a piece of code to disable the digital button, however all of the other digital buttons in the repeater no longer have the hover interaction.

The second section, is I want the code to do the same thing with the print button. (Make it disabled when no document is available, but hover interaction/other features when document is there)

The code I have written:

$w . onReady (() => {
$w ( ‘#dataset1’ ). onReady ( updateRepeater );
})
function updateRepeater () {
$w ( ‘#repeater1’ ). forEachItem (( $item , itemData ) => {
if ( itemData . digital ) {
$item ( ‘#digital’ ). enable ();
} else {
$item ( ‘#digital’ ). disable ();
}
})
}

A photo of the two buttons