Hello, everyone.
I'm not currently having an issue, but I am trying to understand something. Input is appreciated.
I am using jQuery 1.8, and in one particular document I have set up something that will delete certain files stored within a database. I can't type all the code, here, but I'll try to present an accurate facsimile.
The links to delete a particular file were anchor tags within a span, like so:
Code:
<span style="display:block;" id="span_{ unique identifier }">
<a href="javascript:void;" name="del_{ same unique id }" id="del_{ same unique id }" class="delFile"><img for delete icon /> FILENAME.EXT</a>
</span>
Within document.ready, I had the following:
Code:
$('a.delFile').click(function(evt){
var delID = $(this).attr('id'), spanID = delID.replace(/^del\_/,"span_");
delID = delID.replace(/^del\_/,"");
[[ function to delete file by ID ]]
});
This is working fine in both IE and FF. But something has me perplexed.
I temporarily changed the span tags to paragraph tags, and while it still worked in IE, it stopped working in FF. I reverted back to span tags, and it's working just fine, again. But I'm confused as to why a <p> would prevent the delete function in FF, when <span> had no problem.
Any ideas?
Thank you,