Hi all I want is that a (container) div gets hidden (.videocontainer) when the src=”” and display when there is a link in the source. Hope someone can help out with this one
This is the code I’m working on that obviously isn’t working:
<script type="text/javascript">
$(document).ready(function(){
if ($('iframe[src]').text() === "")
$(".videocontainer").hide(
});
</script>
</head>
<body>
<div class="videocontainer">
<div class="thevideo">
<iframe width="310" height="174" src="http://www.youtube.com/embed/860PGF9GXZY" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</body>
'iframe[src][src=""]'will check thatiframehassrcandsrcis empty and if empty hide thevideocontainerelse show thevideocontainer.OR