Advertisement
thecooldude0517

Untitled

Dec 9th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. JS Text box code:
  2.  
  3. //The function that brings up the text box
  4. myBlurFunction = function(state) {
  5. /* state can be 1 or 0 */
  6. var containerElement = document.getElementById('main_container');
  7. var overlayEle = document.getElementById('overlay');
  8.  
  9. if (state) {
  10. overlayEle.style.display = 'block';
  11. containerElement.setAttribute('class', 'blur');
  12. } else {
  13. overlayEle.style.display = 'none';
  14. containerElement.setAttribute('class', null);
  15. }
  16. };
  17.  
  18. //Area-1
  19. function textChange() {
  20. document.getElementById("popText").innerHTML = "This is text in a box";
  21. }
  22.  
  23. function changeText() {
  24. myBlurFunction(1);
  25. textChange();
  26. }
  27. //Area-2
  28. function alsoTextChange() {
  29. document.getElementById("popText").innerHTML = "This is also text in a box";
  30. }
  31.  
  32. function alsoChangeText() {
  33. myBlurFunction(1);
  34. alsoTextChange();
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement