I have 4 sets of Promoted Links in a table. The idea being the top set show one of the others depending on which tile is clicked.
I have slightly modified THIS SCRIPT to match my needs, but nothing happens.
I have inserted the below into a Script Editor webpart. What am I missing?
EDIT - line 10 - 13 are bothering me...
<script type="text/javascript" src="/Scripts/JQuery/jquery-1.8.1.js"></script>
<script language="javascript">
$(document).ready(function() {
$("div#WebPartWPQ3").hide();
$("div#WebPartWPQ4").hide();
$("div#WebPartWPQ5").hide();
});
$(function () {
$("a[id^=Tile_WPQ]").each(function () {
$(this).click(function () {
var linkTitle = $(this).find('li[title]').attr('id');
if (linkTitle == "Tile_WPQ2_1_7")
{
$("div#WebPartWPQ3").show();
$("div#WebPartWPQ4").hide();
$("div#WebPartWPQ5").hide();
event.returnValue = false;
}
if (linkTitle == "Tile_WPQ2_2_7")
{
$("div#WebPartWPQ3").hide();
$("div#WebPartWPQ4").show();
$("div#WebPartWPQ5").hide();
event.returnValue = false;
}
if (linkTitle == "Tile_WPQ2_3_7")
{
$("div#WebPartWPQ3").hide();
$("div#WebPartWPQ4").hide();
$("div#WebPartWPQ5").show();
event.returnValue = false;
}
});
});
});
</script>