Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JS Text box code:
- //The function that brings up the text box
- myBlurFunction = function(state) {
- /* state can be 1 or 0 */
- var containerElement = document.getElementById('main_container');
- var overlayEle = document.getElementById('overlay');
- if (state) {
- overlayEle.style.display = 'block';
- containerElement.setAttribute('class', 'blur');
- } else {
- overlayEle.style.display = 'none';
- containerElement.setAttribute('class', null);
- }
- };
- //Area-1
- function textChange() {
- document.getElementById("popText").innerHTML = "This is text in a box";
- }
- function changeText() {
- myBlurFunction(1);
- textChange();
- }
- //Area-2
- function alsoTextChange() {
- document.getElementById("popText").innerHTML = "This is also text in a box";
- }
- function alsoChangeText() {
- myBlurFunction(1);
- alsoTextChange();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement