-
Author
-
November 11, 2014 at 10:08 #34983beohsParticipant
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?
November 11, 2014 at 12:46 #34993sharmstrModeratorYou 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 solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
November 11, 2014 at 15:09 #35019sharmstrModeratorThat’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 solutionThis 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.November 11, 2014 at 15:39 #35024beohsParticipantOriginal 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.November 11, 2014 at 15:52 #35030sharmstrModeratorDo 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 solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.