daily pastebin goal
27%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -css-
  2.  
  3. .react-slideshow-wrapper.slide {
  4.   width: 100%;
  5.   overflow: hidden;
  6. }
  7.  
  8.  
  9. -JavaScpript-
  10.  
  11. _createClass(Slideshow, [{
  12.     key: 'componentDidMount',
  13.     value: function componentDidMount() {
  14.       this.allImages = document.querySelectorAll('.images-wrap div');
  15.  
  16.       this.width = document.querySelector('.react-slideshow-wrapper').clientWidth;
  17.  
  18.       console.log(document.querySelector('.react-slideshow-wrapper'))
  19.       console.log(this.width)
  20.       //returned value 0
  21.  
  22.       this.setWidth();
  23.       window.addEventListener('resize', this.resizeListener);
  24.     }
  25.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top