I am looking for a way to dynamically set CSS styles to certain elements using jQuery based on the background color of a specific div with an id of "TestDiv". This functionality is crucial due to our website's theme engine that allows users to change colors using a color palette.
#hdr-nav-wrapper ul li:hover a{
background-color:#0294ca;
}
#hdr-nav-wrapper ul a:hover{
background-color:#00aeff;
}
When appending a navigation bar to the top of the site, I want its background color to match the current background color of "TestDiv". How can I achieve this dynamic adjustment in jQuery?