Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

Get the height of a div without Jquery

$
0
0

@pierro wrote:

Hi,

I am trying to dynamically set the height for my slides (those being of different height, very common problem...)

I want to dynamically set the height of using:

on-slide-changed="slideHasChanged($index)"

However, I cannot find a single solution that works on the net and this forum to get the height of a div without using jquery.

Even the "pure javascript" way (document.getElementById("div").offsetHeight;) won't work.

I tried:

angular.element(document.querySelector('div')).offsetHeight; 
angular.element(document.querySelector('div')).height;

=> without success

Can anyone help me?
Thanks

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>