Forum Replies Created
-
AuthorPosts
-
to that script : it works with sticky element and surrounding parent. The fixed positioning is gone when sticky element reaches the bottom of the parent container. !
So you must do following containeres in a different f.e. color-section !!!
see now the test page i inserted in the same container a 1/1 under it – and this leads to something you don’t want to have.some words on sticky element – :
go and have a look to different devices if the effect works on all – espacially mobile browsers. Very often the page is than unusable.
For our script above we had to find a way to have normal behavior for responsive case ! This is possible – but performance will go down
Another intime process must prove if window width is less than f.e 768px
i think this should only be a gimmick to use on one page – the risk of losing users because of a low performance of the site is too high.if you are working on functions.php of your child-theme it is a good advice to have a working copy of it on your desktop.
if you make some mistakes on changing the code ( maybe a semikolon is missing or quotationmarks aren’t the right one etc. you will see a white screen and can not interact with your site.) you could alway playback the working copy via ftp to your site.___________
so now – as i said is if you have all done for implementation of the script.
That little script is written to have an element fixed within his surrounding container !
So you have to adress (select) two containers – the one which is fixed and the parent container of this element.this part of the script should be adjusted to your givings:
jQuery('.sticky_element').sticky('sticky_parent_container', { …1) The parent container can be a class or an id etc. on Enfold it could be the id of the section: #av_section_1 2, 3, 4 etc.
2) the sticky_element should be a unique class ( on my test page above i used on the bottom that class vor the 2nd and 3rd Column – that is possible.
– so go and give a custom class to the column you like to have the fixed position. (f.e.: sticky_element1, sticky_element2 etc)the second code ( the first was the implementation of the script itself) for functions.php of your child-theme is than:
and this (second one) is that the script nows what to handle and how:add_action( 'wp_footer', 'custom_sticky_script' ); function custom_sticky_script() { ?> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery('.sticky_element1').sticky('#av_section_1', { useTransition: false, animate: false, offset: 85 }); }); </script> <?php }Testing page is my page where i tested it for you if it will work: https://webers-testseite.de/sticky-column/
nearly every modern browser got his own “developer tools”.
on a lot of browsers hold the mouse over the element you want to inspect and press context menu button of your mouse (left button) on my magic mouse it is the left part of the active sensor field.
on that context menu there is something like inspect the element or only inspect.
on first use a window opens with the source code and some extra infos about css etc. – you can have that part of the window as an extra window separated from your frontend window. Now have a look what happens when you go with your mouse over the elements.https://streamable.com/s/5lhs9/xykcyp&iframe=true
there you can get what you want – all the classes and ids.
The html source code is on the left and well formated with cascaded styling – parents are allways more left – and on click to the little arrow the container opens and shows you the inner content.The realy clou on that is that you can edit on the right side the css virtually. Nearly allmost Changings are shown on your front end immediately.
click on image to enlarge – you will see that i virtually changed the color of that inputfield i’m writing on now:On Enfold the color-sections got ids with the pre-name av_section_ and a count (starting at 1)
PS i tested a few minutes ago – it is ok if you do not adress only the direct parent you can take the color-section as surrounding container too:
add_action( 'wp_footer', 'custom_sticky_script' ); function custom_sticky_script() { if( is_page(30238) ) { ?> <script type="text/javascript"> jQuery(document).ready(function(){ // With options jQuery('.sticky_element').sticky('#av_section_1', { useTransition: false, animate: false, offset: 110 }); jQuery('.sticky_element2').sticky('#av_section_3', { useTransition: false, animate: false, offset: 0 }); }); </script> <?php } }by the way – this code is the cleanest code – you can try other options as animate or delay etc. yourself
well the scripts you can download from the github link above – take the minimized one: Link
create a child-theme and in the child theme folder an js folder
upload that minimized script to this js folder.on your functions.php of your child theme insert:
function include_sticky_js_file() { if( is_page(30238) ) { wp_enqueue_script( 'stickyelement', get_stylesheet_directory_uri().'/js/jquery.stickyelement.min.js', array('jquery', 'avia-default'), 2, true ); } } add_action( 'wp_enqueue_scripts', 'include_sticky_js_file', 100 );you see that i only embed the code where i need it. The other pages stay untouched because of performance reasons.
Allthough that little script only has 4kbNow you need the script for the implementation on the specific page:
the script has two (take some classes – this is easy to set on enfold) containers to observe
the container which is sticky – and the parent element. So i gave to the color-section (or whatever it is a class that i can select it easier and the same with the container which should remain sticky.See code for my test installation:
add_action( 'wp_footer', 'custom_sticky_script' ); function custom_sticky_script() { if( is_page(30238) ) { ?> <script type="text/javascript"> jQuery(document).ready(function(){ // With options jQuery('.sticky_element').sticky('#av_section_1 .entry-content-wrapper', { useTransition: false, animate: false, offset: 110 }); jQuery('.sticky_element2').sticky('#av_section_3 .entry-content-wrapper', { useTransition: false, animate: false, offset: 0 }); }); </script> <?php } }you see on my testpage two containers which stay fixed so two codes for it
jQuery('.sticky_element').sticky('sticky_parent_container', { …so on my testpage the column gets the class sticky_element (and sticky_element2)
and the direct parent container is adressed by me via#av_section_1 .entry-content-wrapperthats all – you have to play with the offset value
my recommendation: use for that very demanding point of a fixed positioning in floating systems a given script.
From my recherche point – there is no good plugin for it – but a few good jQuery scripts to solve the problematic.
The scroll event is something you have to be carefull with – not to overload site performance.
You have to think about – if you have long fixed column too ( longer than screen height ! how to view this content under the screen bottom of the fixed column!have a look to this site: https://webers-testseite.de/sticky-column/
if you scroll to bottom – the fixed positioning is gone to get the content in the left column too !you find the script on : https://github.com/EnzoMartin/Sticky-Element#readme
if you like this solution – i will show you how to load only for the given pages the sources. And to implement it in enfold.
October 30, 2017 at 3:25 pm in reply to: Search icon left, logo center and burger menu right in mobile view #870507well first – you don’t want to have two search icons ? – yes – so remove the one by dashboard – enfold(-child) – hauptmenu – Append search icon to main menu
uncheck the box.
Try to get rid of your code to center the logo.
if you haven’t anything against it post a live link to your page.Get familiar with child-themes – this is the only way to do proper hooks and filters.
You don’t loose changes by updating the parent themeSee here with download. No Magic behind it:
Theme-Documentation: https://kriesi.at/documentation/enfold/
Using Child-Theme: https://kriesi.at/documentation/enfold/using-a-child-theme/
Download a predefined child-theme: http://bit.ly/enfold-childfor information : I use a child theme called “evryware”
https://kriesi.at/documentation/enfold/change-the-dynamic-css-file-name/
but if you have this in your “child-theme” called everyware :
/* Theme Name: Enfold Child Description: Childtheme fuer Enfold Version: 1.0 Author: Kriesi Author URI: http://kriesi.at Template: enfold */ /*Add your own styles here:*/you don’t need to do anything i guess
but you can even rename the enfold folder to everyware and name your child-theme : everyware-childand this will be the propper use of Theme Name obfuscation
Than do this in Child-Theme style.css
/* Theme Name: everyware Child Description: Childtheme fuer everyware Version: 1.0 Template: everyware */rename the enfold folder to evryware you can all do that via ftp !
and that to functions.php of your child-theme:
add_filter('avf_dynamic_stylesheet_filename', 'avia_change_filename'); function avia_change_filename(){ return 'everyware'; }the code of Ismael comes too into child-theme functions.php – BUT ! he has to look over it – because there are some “slip of the pen” faults
ah – you have forgotton one closing curly bracket after return logo. !
on if clauses you can have nice things like:
if ( is_singular( 'event' ) || is_search( ) || is_category( ) || is_page( ) && !is_page(1307) || is_singular( 'portfolio' ) ) {the
||marks the or and the!. means not-
This reply was modified 8 years, 4 months ago by
Guenni007.
first of all – you can simplify a bit this by using arrays:
add_filter('avf_logo','av_change_logo'); function av_change_logo($logo) { if ( is_page( array( 3364, 3385, 3403, 3416, 3626, 3813 ) ) ) { $logo = "https://splinter.care/wp-content/uploads/2017/09/Telefoonnummermagenta.png"; } elseif ( is_page( array( 3542, 3568, 3695 ) ) ) { $logo = "https://splinter.care/wp-content/uploads/2017/09/Telefoonnummercyaan.png"; } return $logo; } add_filter('avf_logo_link','av_change_logo_link'); function av_change_logo_link($link) { $link = "tel:0031850657349"; return $link; }i do not see a fault on your code – even the if, if, if must work. (only the double marks – but this is due to boardsoft and not using the code tag)
var sticky = $('.fixed_element');so i guess the $sticky is wrong in the rest of the function – or you setup
var $sticky = $('.fixed_element');October 29, 2017 at 8:23 pm in reply to: Search icon links, Logo mittig und burger menu rechts #870200ich denke du hast mehr Erfolg eine Antwort der Mods zu erhalten, wenn Du englisch hier nachfragst.
Es gibt zwar einige Mods die auch deutsch verstehen , bzw sprechen – (mein Namensvetter Günter aus Österreich) – aber das Gros spricht hier Englisch.i do use this code – don’t know if both will work:
add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );but this will affect only the upload – so if you want to handle already uploaded images you must use after the code a plugin like regenerate thumbnails – to recalculate the images.
October 29, 2017 at 7:37 pm in reply to: Search icon links, Logo mittig und burger menu rechts #870186??? https://kriesi.at/support/topic/search-icon-left-logo-center-and-burger-menu-right-in-mobile-view/
hm – do you believe there is a better solution?
Es nimmt Dir hier keiner Übel wenn Du was nicht verstehst, – dann ist einfach nachfragen angesagt. – Aber einen neuen Thread aufmachen ist nicht so toll. Und wird selten gerne gesehen. Jedenfalls war das in den Boards so, die ich damals leitete.
War etwas unverständlich an meiner Erklärung vom Link oben?
Weisst du wie du ein Child-Theme einrichtest?
Wo man die functions.php im Dashboard findet ?
etc. – keine Frage ist zu dumm.
Die Lernkurve ist hier an Board sehr steil._____________________
It does not take you any evil here if you do not understand something, – then just ask is announced. – But a new thread is not so great.
Was something incomprehensible at my explanation from the link above?
Do you know how to set up a child theme?
Where to find the functions.php in the dashboard?
etc. – no question is too stupid.
The learning curve is very steep here on board.October 29, 2017 at 7:26 pm in reply to: Display logo in ‘Sidebar Flyout menu’ and hide in header #870185look here: https://kriesi.at/support/topic/logo-isnt-showing-in-mobile-menu/#post-868215
now it is a bit easier because the new 4.2 got now every burger-menu list point a unique id so on #avia-menu you can set the menu-item-id to display none. on burger-menu – do nothing.the method ist to put in menu two home links – the one shows the text the first one is replaced with the img src .
This first one you set on #avia-menu to display none.try this in quick css and have a look what happens to the very small screens (drag your browser-window extremly small)
if all fits well in this case too – it is ok otherwise you have to do more css to fit for that case#socket .container { text-align: center } #socket .copyright { float: none; width: 100% }October 28, 2017 at 4:59 pm in reply to: Search icon left, logo center and burger menu right in mobile view #869968that means on non responsive case you have the text menu?
no difference between the codes – only if you have a top-navigationAnd Safari not solved.
By the way – did the .mejs-container only exists if a self-hosted video is set.
on my test page i only inserted youtube video – and no way to find that class.the original image is on : https://kriesi.at/themes/enfold-construction/files/2015/10/house-wire-model-fade-white.png
kriesi has now https too and therefore the links are new
October 28, 2017 at 4:20 pm in reply to: Search icon left, logo center and burger menu right in mobile view #869953so it depends now if you have social icons on the right side – if so we had to style the positioning again
f.e. the.avia-menu.av_menu_icon_besideOctober 28, 2017 at 3:52 pm in reply to: Search icon left, logo center and burger menu right in mobile view #869929have a look to this –
i do not know if you have social icons too besides the burger menu icon
and how did you center the logo (its in my code implemented)
you have to style it for the different responsive cases.https://webers-testseite.de/elegant/
you must use a child-theme for this solution:
this comes to functions.php of yout child-theme:
add_filter( 'ava_main_header', 'avia_append_search_header_mod'); function avia_append_search_header_mod() { global $avia_config; ob_start(); get_search_form(); $form = htmlspecialchars(ob_get_clean()) ; $items .= '<div id="menu-item-search"> <a href="?s=" data-avia-search-tooltip="'.$form.'" '.av_icon_string('search').'> <span class="avia_hidden_link_text">'.__('Search','avia_framework').'</span> </a> </div>'; echo $items; }this comes to quick css:
div .logo, .logo img, .logo .subtext img { left: 50%; transform: translateX(-50%); } #top #header_main #menu-item-search { position: absolute; left: 25px; top: 25px; } #top #header_main #menu-item-search a { color: #333; font-size: 24px; } .responsive #top .logo { position: relative; }the page concerning to is the landing-page of that demo
and i recognised that if i choose on this case not the contain option. If we take there the no-repeat it will be the best for ipad etc.
but i can not force it by media-queries .see here with position fixed but center center and no-repeat ! ?
well it is not as easy as to place it in quick css. on shortcodes.css replacement it has an effect.
perhaps you edit the keyframe too – it looks better – the distance of transformation is to short to see a faster animation.f.e.
@-webkit-keyframes avia-ltr { 0% { -webkit-transform:translate(-50%,0); opacity: 0; } 100% { -webkit-transform:translate(0,0); opacity: 1; } } @keyframes avia-ltr { 0% { transform:translate(-50%,0); opacity: 0; } 100% { transform:translate(0,0); opacity: 1; } }see https://webers-testseite.de/elegant/animated-images/
PS: try to set the keyframes on quick css – i did not test it – if it works
you see that this is only one example of /*animation variations*/
i see alot of animation on your site but not where you uses the enfold implemented one. I see some transfomings with matrix.
Where are your animations to style ?And where is the enfold theme ? :lol
https://js-interactive.com/by the way – very impressive !
i believe it is on wpml easy to obtain – under the wpml options there are on Languages just under Language URL Format the:
Language switcher options
All language switchers in your site are affected by the settings in this section.there is “How to handle languages without translation” try to choose skip language and see what happens
hm – just a moment –
yes indeed
But please think of it if the sprite method is an option to do it – it is used for a long time and has the advantage that the image is completely loaded before someone hovers the image.
Less http request is one reason for it. See here a nice Article about Sprites: https://css-tricks.com/css-sprites/
And here is a Sprite Generator if you are not familiar with photoshop. https://www.toptal.com/developers/css/sprite-generatorsometimes the video starts automatically – sometimes it is only a screenshot seen. and the playbutton on it has no function
Dont know.on shortcodes.css there are some extra entries for the customisable down arrow.
just one line above – on line 369 :
new 4.2:div .av-section-color-overlay{position: absolute; top:0; left: 0; bottom: 0; width:100%; }
old 4.12div .av-section-color-overlay{position: absolute; top:0; left: 0; height: 100%; width:100%; }i replaced this old line in the new 4.2 shortcodes css – and voila even Safari plays the video again.
https://webers-testseite.de/elegant/beispiel-seite/
PS do not wonder – i changed a bit in section.php to have the possiblity to mute or unmute video background.
EDIT: wow just now ? only safari makes some troubles.
OK – we had to search for it – this is not the solution.
-
This reply was modified 8 years, 4 months ago by
Guenni007.
-
This reply was modified 8 years, 4 months ago by
-
AuthorPosts

