Fancybox in Button

Your Account / Forums / Easy FancyBox Pro / Fancybox in Button

  • Author
    Posts
    • March 16, 2019 at 10:42 pm #13524

      Hello,

      I have this question:
      there’s a button in a theme I bought that its controls are in the theme options, now I can change name and link there but can’t give that button a class fancybox-inline.

      also in order to show that particular page in fancybox i need to give the class name to but can’t find anywhere that option maybe because of the theme defaults don’t know… just saying

      any advise?
      here’s the theme https://x-theme.com/avas-default/ just in case want to checkit (i’m using that same style) and the button it’s that one that says BUY

      Thanks for any assistance

    • March 16, 2019 at 10:42 pm #13529

      Hi Igor, does the button on your site appear in the menu same as the demo page? If so, you should be able to give that menu item (not the button itself) the class fancybox-inline … if not, we might be able to target the button class bddex-menu-btn with some custom javascript. Does the theme have a field to add custom javascript to the footer maybe?

    • March 16, 2019 at 10:42 pm #13536

      Yes Pharéo,

      First of all thanks for the assistance, yes it does both of the questions…
      here’s a screenshot to the button controls https://snag.gy/zKc3sP.jpg

      and here’s the Js and css customs options https://snag.gy/vBLRfZ.jpg
      what you suggest?

    • March 16, 2019 at 10:42 pm #13547

      OK, thanks for those images they tell me a lot 🙂 … It does not seem to be a regular WordPress menu so there is no option to add a class to the menu item itself. But the Javascript Body field will allow us to add some script that could help us.

      Please try:

      
      jQuery(function($){$('.bddex-menu-btn').addClass('fancybox-inline');});
      

      I’m not sure if the theme will wrap the code in the correct script tags though. So if it does not work, can you share a link to your dev site so I can take a look at the result? You can use the contact form to keep the link off this public forum.

    • March 16, 2019 at 10:42 pm #13548

      Thanks,
      will use the contact form

  • You must be logged in to reply to this topic.