Skip to main content

Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 171 total)
  • Author
    Posts
  • in reply to: Smooth menu // by @fainder #300082
    JeroenR
    Participant

    I think it depends on what you want here. But the problem is in the condition if (!e.data.multiple).
    If you remove that, all items toggle their submenu, but don’t have effect on each other.

    When you don’t feel comfortable in doing such changes, maybe the best thing to do is find another menu function that does the work for you.

    in reply to: Why won’t my jquery link work in my html file? #300065
    JeroenR
    Participant

    I don’t see why you need jQuery for doing this?

    This seems to be a Google font, so navigate to here, copy the link element and use the font in your H1 element.

    in reply to: Adjust content margin when div doesn’t exist #299607
    JeroenR
    Participant

    Yes, unfortunately the codepen you provided isn’t really helpful. Nevertheless, if you want to check the presence of some elements after the loading script of the sponsored elements, then you will need to have an event which tells you that the loading script of that sponsoring is done.

    By default you can assume the HTML of the sponsored block is not in there, do something with that situation.
    Then, on the event triggered by the sponsoring, you can have a function which checks the HTML and do something with that situation.

    Question is, is there a load event or ready event or something like that in the script that load the content of your sponsors?

    If not, maybe you can use something like mutation observer for detecting the changes. Use it on the element where the content of the sponsor gets appended to.

    in reply to: Adjust content margin when div doesn’t exist #299507
    JeroenR
    Participant

    Well we can’t really guess what changes you made, so maybe you can show the code in a demo (codepen for example). One piece of code with the sponsored HTML and one without?

    in reply to: Help hiding a li #299169
    JeroenR
    Participant

    Can you try building a demo on what your work looks like in https://codepen.io for example?

    display: none; should do the trick for you as it takes no space at all.

    You can also wonder if the item you desperately want to hide should be in the HTML in the first place.

    JeroenR
    Participant

    I guess for images using padding or margin would end up in the same result. Though reading the documentation on margin and padding I would recommend margin for this. Since padding is the space inside the box and margin is the space outside of the box.
    See some documentation here https://medium.com/frontendshortcut/margin-vs-padding-c1fc8ea8bfaf for example.

    Keep in mind that an image is an inline element by default.

    in reply to: jquery passing argument to functions?. #299002
    JeroenR
    Participant

    I can’t see why this would be any different from vanilla javascript. My best advice would be to start reading here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters and further.

    There is an exception for example when you do something like this: button.addEventListener('click', myFunction);, in that case the argument passed is the event.
    It’s jQuery equivalent would be something like this: $('button').on('click', myFunction);
    Passing an argument to that function would then be something like this: $('button').on('click', myFunction('test'));.
    And if you still want to have the event in your array of arguments you can do something like this: $('button').on('click', function (e) { myFunction(e, 'test') });

    in reply to: How to load image when I reach it after scrolling? #298368
    JeroenR
    Participant

    I would say this is impossible with CSS only. Why wouldn’t you want to use javascript for this?

    in reply to: How can a button be placed on top of an image?age? #298367
    JeroenR
    Participant

    You can try something like this: https://codepen.io/jeroenreijs/pen/JjjpZOg.
    The popup has absolute positioning. The DIV with class .thumbnail. Because the other button is a child of the DIV with class .gallery-item, I added position: relative to that class as well.
    Now you can maybe play around with the positioning as they are now both in the center and therefore on top of eachother.

    in reply to: CSS minification #298030
    JeroenR
    Participant

    I suggest use Google and look for a solution that matches your way of working, for example there are different ways to do this here: https://blog.logrocket.com/the-complete-best-practices-for-minifying-css/

    in reply to: Changing table width without shrinking/stretching #297999
    JeroenR
    Participant

    It might not be what you mean and performance wise not the smartest thing to do, but maybe you mean something like this? https://codepen.io/jeroenreijs/pen/vYYJyVV

    in reply to: Who can help me with this code to hide something? #297282
    JeroenR
    Participant

    No, sorry, it doesn’t. I took a look at the source of your website. There is no usage of the classname wp-embed-site-icon, nor oefooter. So I’m wondering which buttons you’re trying to hide.

    in reply to: Who can help me with this code to hide something? #297278
    JeroenR
    Participant

    I think the reason why nobody is responding is that no one likes to look at a whole website to find what’s going on.
    Maybe you can isolate the problem and copy the corresponding code to a tool like codepen?

    in reply to: Hover card overlay effect. #297277
    JeroenR
    Participant

    Hm, I see nothing wrong there on iOS Safari…

    in reply to: Hover card overlay effect. #297076
    JeroenR
    Participant

    Not really sure what you mean, but maybe this? https://codepen.io/jeroenreijs/pen/wvvaGpK
    I think it’s has mainly to do with your selector. I used this selector: .projects-content:hover .projects-content__image::after instead of your .projects-content__image:hover::after > *:hover.

    Also because of the HTML markup I changed the absolute positioned div from width 100% and height 100% to 90% which matches the overlay then. And the position is (100% – 90%)/2 = 5% from bottom and left.

Viewing 15 posts - 1 through 15 (of 171 total)