I have two divs covering the entire page, each at 50% width. When the lower div is clicked, I want it to expand to cover the full screen, and return to its original size on click again. Here is an example:
$('.wrapper div.green').click(function() {
$(this).toggleClass('go')
if ($(this).hasClass('go')){
$(this).animate({'height':'100%'},{
duration:200,
step:function(gox){
var height = gox < 100 ? (100 - gox) / 1 : 0;
$(this).siblings().css('height', height + "%");
}
})
} else {
$('.wrapper div').animate({'height':'50.00%'},200)
}
});
Now I want to achieve this in AngularJS, but I'm new to it and encountering some challenges. I'm seeking guidance to help me move in the right direction. Here is what I've attempted so far:
All I want is a similar functionality as that of JQuery.