Levi Villarreal Levi Villarreal - 8 months ago 24
jQuery Question

Jquery .click not working when changing css properties

I have this html,

<h2 class="more-button">Read More</h2>

and am trying to have it change the position of another div when it is clicked. To accomplish this I am using

$(".hidden-block").css("right", "110%");

FIDDLE : https://jsfiddle.net/wfxxkk3x/

But the code does absolutely nothing. I have tried many different approaches with this problem and nothing seems to work. Any help would be appreciated.


Change the selector of the hidden-block from a class to an id

$("#hidden-block").css("right", "110%");});


or use animate to animate the div