Instead of using javascript to split the tiles into multiple rows, you can achieve this using CSS and don't have to risk to "break" any other element with the script.
From an old answer of mine:
"Instead of using jQuery, you could try a CSS-only solution, tinkering with nothing more than the width. Might give you better control over the promoted links.
<style>
/*display rows of 3 items*/
.ms-promlink-body {
width: 480px;
}
Easy way to display promoted links (tiles) on multiple rows
If you need to target a specific promoted links list, you can do it with the web parts ID.
<style type="text/css">
#WebPartWPQX .ms-promlink-body {
width: 480px;
}
In the class #WebPartWPQX, X should be a number which you can find by using F12 developer tools ( Press F12 in the browser ) and click on the list to find the web part ID. So it should be WebPartWPQ1 as a example."
To change the font for the tiles, just add this CSS
.ms-promlink-body {
font-family: Verdana;
}
Formatting the layout of multiple promoted links