I have a problem where I have to loop through a set of photos and generate <a href> tags for each one that is displayed. However, the link that is displayed is going to depend on whether or not javascript is enabled. So I'm trying to figure out which way to make this happen is the best practice.
My first thought is to simply declare the <a href> as I would if JS wasn't enabled (as well as include an id in the tag) and then write some JS that swaps the a href tag for the JS enabled one. Any body have any better ideas?
My first thought is to simply declare the <a href> as I would if JS wasn't enabled (as well as include an id in the tag) and then write some JS that swaps the a href tag for the JS enabled one. Any body have any better ideas?
