I am trying to make paragraph 1 show on a certain list of pages and paragraph 2 show on the pages not mentioned. The problem is, that I am seeing paragraph 2 on all pages.
This is not my code I was asked to make adjustments to already existing code and I am not very savvy with JS so please forgive my ignorance. Any help is greatly appreciated and thanks for reading.
Code:
if ((querystring('category') == '1')
&& (querystring('category') == '2')
&& (querystring('category') == '3')
&& (querystring('category') == '4')
)
{
var productContent = $('div#catalogContainer').html();
var textContent = "<p>Paragraph 1</p>"
$('div#catalogContainer').html(productContent + textContent);
}
else
{
var productContent = $('div#catalogContainer').html();
var fullTextContent = "<p>Paragraph 2</p>"
$('div#catalogContainer').html(productContent + fullTextContent);
querystring('category')returns. Please show the function.