Don’t know if you were ever able to solve your issue, but there is not enough information to really help. From what I can see there is not reason that would not work and too many possibilities for why it does not depending on the rest of the code on the page.