Beschrijving
Knop om te zorgen dat de page terug gaat naar de vorige – waar die vandaan kwam.
Ga naar: header | body | posts | reactie.| componenten | afbeeldingen
Communicatie
- Create a button using Divi’s Button Module.
- In the Button Module settings, go to the Content tab and enter your desired text for the button (e.g., “Close and Go Back”).
- In the Advanced tab, add a custom CSS class to the button (e.g., “close-and-go-back”).
- Add the following JavaScript code to your page or theme’s JavaScript file:
-
jQuery(document).ready(function($) {
$('.close-and-go-back').click(function(e) {
e.preventDefault();
window.history.back();
window.close();
});
});This code will make the button go back to the previous page and attempt to close the current tab. However, please note that modern browsers may not allow scripts to close windows they didn’t open for security reasons.
Sources
Fin
Fin • AI Agent
- Globally: Go to WordPress Dashboard → Divi → Theme Options → Integration Tab. You can add your code to either the <head> or <body> section, depending on where you want it to run.
- On specific pages: Use the Visual Builder to insert a Code module into your layout. Place your JavaScript code in the module’s Content Tab → Code section.
- Using a child theme: Create a child theme and add your JavaScript code to its files.
- For simple additions: Navigate to Divi → Theme Options → Integrations → Head and paste your code there.
Source
Fin
Attentie
Js script & Css
Tag in module button & javascript in yntegration –> head
Systeem aanpassen thema • Divi option > general > aangepaste css
sfgsfasf f
fsfdfsadf
Aanvullende Css • Divi option > general > aangepaste css
sdfsdf dsfss fsdfsdsdfg dfgsdsd
fsffsdffsff
sdffsfsdffg fdfg dsdd fdgdfgfdg
Divi options > integration > Voeg code toe aan de < head> van uw blog
- Create a button using Divi’s Button Module.
- In the Button Module settings, go to the Content tab and enter your desired text for the button (e.g., “Close and Go Back”).
- In the Advanced tab, add a custom CSS class to the button (e.g., “close-and-go-back”).
- Add the following JavaScript code to your page or theme’s JavaScript file:
jQuery(document).ready(function($) {
$('.close-and-go-back').click(function(e) {
e.preventDefault();
window.history.back();
window.close();
});
});
Divi options > integration > Voeg code toe aan de < body >
sdfsdf dsfss fsdfsdsdfg dfgsdsd
fsffsdffsff
sdffsfsdffg fdfg dsdd fdgdfgfdg
Divi options > integration > Voeg code bovenaan uw posts toe.
sdfsdf dsfss fsdfsdsdfg dfgsdsd
fsffsdffsff
sdffsfsdffg fdfg dsdd fdgdfgfdg
Divi options > integration >
Voeg code onderaan uw posts toe, geplaatst voor de reacties
sdfsdf dsfss fsdfsdsdfg dfgsdsd
fsffsdffsff
sdffsfsdffg fdfg dsdd fdgdfgfdg
Divi componenten. aangepaste cs
sdfsdf dsfss fsdfsdsdfg dfgsdsd
fsffsdffsff
sdffsfsdffg fdfg dsdd fdgdfgfdg
Css in vrije vorm
close-and-go-back
Elementen voor
Hoofd elementen
Elementen na
Afbeeldingen
sdfsdf dsfss fsdfsdsdfg dfgsdsd
fsffsdffsff
sdffsfsdffg fdfg dsdd fdgdfgfdg
Ga naar: header | body | posts | reactie.| componenten | afbeeldingen | top
How to create a button which close the tab and goes to the previous page