I have an element with ID="not1" which is a link to inserted news headlines being dynamically created with the respective news of each title as shown below.
<div id="noticia">
<div id="not1"><a href="<?php $noticia['idp_postjauport'] ?>"><?php print $noticia['tit_postjauport'] ?></a></div>
<div class="col-md-12" id="col-md-12">
<?php print $noticia['pos_postjauport'] ?>
</div>
</div>
</p>
I have a javascript that should display the contents of my link only when I click on it, javascript below.
<script type="text/jscript">
$("#not1").click(function(event){
event.preventDefault();
$("#col-md-12").hide('slow');
$("#col-md-12").show(3000);
event.preventDefault();
});
});
</script>
What's happening is that my html page is bringing this open element, but if I click the link it closes and opens again ... I do not know how to fix this little problem