This topic has 5 replies, 2 voices, and was last updated 10 years by sharmstr.

  • Author
  • #34983
     beohs
    Participant

    I’ve asked for support at rtcamp if it ist possible to have masonry in there rtmedia pro widget.
    they gave me the following code with the order to place it in the themes js:

    jQuery( document ).ready( function ( $ ) {
    jQuery(‘.widget-item-listing img’).css (“height”,”auto”);
    jQuery(‘.widget-item-listing img’).css (“width”,”auto”);
    }

    I’ve got no idea where to place it. You’ve got a hint for me?

    #34993
     sharmstr
    Moderator

    You can put it in theme options – javascript code. Wrap it with <script> and </script>

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #35011
     beohs
    Participant

    thanks, but did not work..

    #35019
     sharmstr
    Moderator

    That’s where you can add javascript code. I use it for several scripts. Are you sure that script even works?

    View the page source of a page that has the widget. Do a search for <script> Look for the code they gave you to verify that its being added to the page.

    I can tell you that I added it and it doesnt do anything to the gallery widget. Here’s a screenshot of my page when I view source and search for <script>.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    Attachments:
    You must be logged in to view attached files.
    #35024
     beohs
    Participant

    Original Answer.

    As per the widget settings, height and width of thumbnail will be fixed in px. You can override that property in your theme’s js file using following code to work with masonry.

    jQuery( document ).ready( function ( $ ) {
    jQuery(‘.widget-item-listing img’).css (“height”,”auto”);
    jQuery(‘.widget-item-listing img’).css (“width”,”auto”);
    }

    You see a possibility to crop the pictures inside the widget instead?
    thanks for help.

    #35030
     sharmstr
    Moderator

    Do it in css

    COPY CODE
    
    .widget-item-listing img {
    height: auto !important;
    width: auto !important;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 6 posts - 1 through 6 (of 6 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?