Tagged: x
-
AuthorPosts
-
June 24, 2016 at 1:44 am #1057677
lindsayfaasParticipantI’m trying to put an icon on my card element, on the front, to help people to know to “flip” the card. I’ve tried using the shortcode for icons in with my text but that doesn’t work. Is there something else I can do? Please dumb it down, everything code related is relatively new to me 🙂
June 24, 2016 at 2:22 am #1057721
LelyModeratorHi There,
Thanks for posting in. Under Front Graphic on the Card element we can add an Icon. Unfortunately, icons is not supported inside the Front Title and Content part of the card element. Those option is intended for simple text only and not a shortcode. Thank you for understanding.
June 24, 2016 at 2:52 am #1057740
lindsayfaasParticipantis there any kind of code that would work to do that?
June 24, 2016 at 3:48 am #1057792
LelyModeratorHi There,
HTML element are strip out on the Front Content textfield. We can use Javascript instead. Add custom-cardon your Card element class field. Then on Settings Tab> Custom JS add the following:
(function($){ $( '<i class="x-icon x-icon-adjust" data-x-icon="" aria-hidden="true"></i>').insertAfter( ".custom-card .front .x-face-text" ); })(jQuery);Update the icon above to your preferred icon.
Hope this helps.
June 24, 2016 at 10:27 pm #1058921
lindsayfaasParticipanti shall give that a try. Where do I look for the Card element class field? Which file am I manipulating? THanks again
June 25, 2016 at 12:29 am #1058989
ChristopherModeratorHi there,
Please see the attachment.
Thanks.
July 1, 2016 at 3:01 am #1068073
lindsayfaasParticipantok, I put the code in and it inserts after the text, and is the “adjust” icon. When I change “x-icon-adjust” to “x-icon-rotate-left” nothing happens. Where exactly do I change the icon type? In that vein how do I color and size it now in the JS we’ve created?
ThanksJuly 1, 2016 at 5:46 am #1068177
Paul RModeratorHi,
To change it to rotate left, change the code to this.
(function($){
$( '<i class="x-icon my-icon x-icon-rotate-left" data-x-icon="" aria-hidden="true"></i>').insertAfter( ".custom-card .front .x-face-text" );
})(jQuery);Then add this in custom css to change its color and size
.x-icon.my-icon { color:red; font-size:20px; }Hope that helps.
July 6, 2016 at 1:16 am #1074229
lindsayfaasParticipantThanks that worked like a charm
Is there a way to tell certain cards to not “flip”?
July 6, 2016 at 2:26 am #1074295
ChristopherModeratorHi there,
So why you want to use card element then? you can add simple text element.
Thanks.
July 6, 2016 at 1:18 pm #1075165
lindsayfaasParticipantIt is a great ease of use element (aside from the icon adding) and for myself with little coding experience it would be much easier to make multiple cards with the simple user interface the card element has over doing it all myself in a text element. can it be done?
July 6, 2016 at 8:06 pm #1075643
RadModeratorHi there,
Sure, please add this CSS 🙂
.x-card-outer.flip-3d.flip-from-top.flipped .x-card-inner { -webkit-transform: rotateX(-0deg); -ms-transform: rotateX(-0deg); transform: rotateX(0deg); }Thanks!
July 6, 2016 at 10:26 pm #1075857
lindsayfaasParticipantHi there, it didn’t work. On the Card Element do I need to input a class or id for it to recognize the change to the css? And in that vein will it stop my other cards from flipping with this change to the code? Thanks again.
July 7, 2016 at 2:17 am #1076039
Paul RModeratorHi,
Can you provide us your site url so we can take a closer look.
Thanks
July 8, 2016 at 2:22 am #1077603
lindsayfaasParticipantThis reply has been marked as private. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1057677 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
