I have four divs each with the same ID but different class.
<div id="inner" class="1"></div>
<div id="inner" class="2"></div>
<div id="inner" class="3"></div>
<div id="inner" class="4"></div>
I then have a jQuery script setting the height of the divs to be the height of the window (plus a little bit)
jQuery(document).ready(function($) {
var h = $(window).height();
$('#inner') .css({'height': h+100});
However this is only working for Div1, the script seems to stop working for the next 3 divs. Is there a way to keep it running for all 4 divs?
Many Thanks
quick edit im obviously new at this and just needed a quick hand, so thank you to the people that gave the time to give me an answer i can work with, and my sincere apologies to the person that negatively voted the question, if it was a burden to you to read, you could have just not read it?
ID’s must be unique, make their ID’s unique or else calling $(“#inner”) will only return the first div.
HTML:
Javascript: