aeperri
-
Posts
4 -
Joined
-
Last visited
Content Type
Forums
Gallery
Blogs
Events
Store
Downloads
Profiles
Posts posted by aeperri
-
-
1 hour ago, creedon said:
I'm not seeing a leave button in the header. In general not all elements on a page have an explicit id set.
However almost all elements can be targeted somehow with a CSS selector. But to know what selector we'd need to see the specific element.
Yes, sorry, I had to pivot for the client so they didn't get confused. I changed the button to a donate button. But for example, lets say I wanted to use that donate button in the header? Can you use javascript like that on a button?Â
Â
-
1 minute ago, creedon said:
Ha ha. @paul2009 and I both had the same thought! 🙂
Great minds! 🙂 And it worked! Thank you so much!
Bonus question if I may, since you both are rock stars and responded so quickly! If I wanted to apply this same function to the button on my header (Leave this website button) - is there a way I can assign an CSS ID  to that button to have this same functionality work on that button? If not no big deal, I can make the added bar work. But wondered if there was a simple way to target that specific button.
Â
-
@creedon @paul2009 - I have read this thread 100 times and still can't get this to work correctly on our site, but would love some assistance. This is the link : https://www.empowernowproject.org/ (pw: 84532)
I followed Inscape's info exactly:
1. I added the text "quick exit" to a code block in my footer.
2. Add the custom css to design > custom css (and successfully changed styling a bit)
3. Added the code below to settings > advanced > code injection > header
<script>
$(document).ready(function(){
  $("#quick-exit").on("click", function() {
   window.open("http://weather.com", "_newtab");
   window.location.replace('http://google.com');
   });
});
 </script>But... nothing happens - no click function. 😞 What am I missing??
Custom Code - Help adding a Quick Disguised Exit button to my site (Brine template)
in Customize with code
Posted
That worked - thanks! This is a nice combo as it will allow us messaging in the top bar, but provide victims (I think) a more obvious big button to push no matter the page they are on. Appreciate your help! Here is a photo of all the code used in code injection for the next person reading the thread in it's entirety. 🙂Â