I've been playing around a bit, with jQuery, just trying to do some replacing of text fields on click of a link and hiding/showing of content items as well. It seems to be working just fine in IE, but I can't seem to get it to work in FF.
My jQuery:
$(function() {
$(".articles a").click(function() {
articlenumber = "1"
$(articlenumber).css("display", "none");
articlenumber = $(this).attr("id");
articlename = $(this).attr("name");
articlenumber = '".' + articlenumber + '"';
//alert(articlenumber);
//$(articlenumber).css("display", "inline");
$(articlenumber).attr("style", "display:inline;")
$(".articletitle").text(articlename)
});
And my HTML for this(simplified):
<a id="article1" name="Article Title1" href="#">Link</a>
<a id="article2" name="Article Title2" href="#">Link</a>
<div class="articlename">Title</div>
<div class="article1" style="display:none;">Text 1</div>
<div class="article2" style="display:none;">Text 2</div>
Any suggestions as to why this isn't working in FireFox? And anything I can clean up here?