question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable matchHeight on Mobile

See original GitHub issue

I want to disable certain matchHeigh elements on mobile devices.

So I wrote this:

if ($(window).width() < 768) {
    $('.noMatch').matchHeight({ remove: true });
  }

The idea would be that elements with .noMatch wouldn’t fire on devices with less than 768px.

But it doesn’t work. How would I have to write this properly?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
kyds3kcommented, Mar 16, 2017

Just to add my 2 cents in, I simply disabled the inline CSS using a media query and this technique:

https://css-tricks.com/override-inline-styles-with-css/

Took me no time and worked a treat!

1reaction
ezetojocommented, Nov 13, 2017

Working solution for bootstrap 3. Based on @kyds3k answer.

@media (max-width:992px) {
    .match[style] {
        height: auto !important;
    }
}

I used it for xs and sm resolutions. If you want to apply it only on xs change media query to 768px.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disable the Match Equal Heights Class on Mobile - Total WordPress ...
Snippets: Disable the Match Equal Heights Class on Mobile ... ​@media only screen and (max-width: 767px) { .match-height-content { height: auto !important; } ......
Read more >
Developers - Disable matchHeight on Mobile - - Bountysource
I want to disable certain matchHeigh elements on mobile devices. So I wrote this: if ($(window).width() < 768) { $('.noMatch').matchHeight({ ...
Read more >
Disable the Match Equal Heights Class on Mobile - Total Theme
When using the theme's match-height-content classname for creating equal height items using javascript, the height is applied across all ...
Read more >
Match Height
Simple JavaScript plugin to make different elements the same height.
Read more >
jquery-match-height not working on first row - Stack Overflow
matchHeight ({byRow: false}); // Row detection gets confused so disable it }); });. You can see this at work in this update to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found