This tutorial will teach you how to remove “<br/>” tags on mobile and tablet. Follow the instruction below:
- Open your jqueryfile.js
- Copy and paste the code below
function remove_br(){
if( $(window).width() < 900 ) {
$( ".your-class-here br" ).remove();
$( ".your-class-here-2 br" ).remove();
}
}
// Function Call
$(document).ready(function () {
remove_br();
});
notes:
- You can change the breakpoints on where you want this function to run. Just change the “900” to your preferred breakpoints.
- Just change the class in your “.your-class-here” where you want your <br/> to be remove.
- Reminder that the class would be most likely a parent of your <br/> tag hence why the code is like this “$( “.your-class-here br” ).remove();”
- after adding the code above, click save and you are done.
note: if you are having trouble using this, just contact the author of this post.