I have a Google Charts table that is loading several links within it. By default, I have links within the cells formatted to open in an iframe called “showme.” What I want to do, when the screen is (or gets) small, is to change the link target to “_blank” since I am hiding the IFRAME using CSS. I have the code below – but it’s not working for even the initial page load. Adding the $(window).on(resize, load…) doesn’t work, either. What syntax is incorrect?
[code]
<script type=”text/javascript”>
function() {
if($(window).width() <= 770)
{$(“a.statutelink”).each(function() {
$(this).attr(“target”, $(this).attr(“target”).replace(“showme”, “_blank”));});
}
};
</script>
Thanks.