Last active
January 25, 2016 19:26
-
-
Save sibaberpollo/33c3cf1dadd47c56e616 to your computer and use it in GitHub Desktop.
consulta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var first_time = true; | |
$(document).ready(function () { | |
updateContainer(); | |
$(window).resize(function() { | |
updateContainer(); | |
console.log(first_time); | |
}); | |
}); | |
function updateContainer() { | |
var width = $(window).width(); | |
if (width <= 768 && first_time == true) { | |
$(".tabs #linea-rota").each(function() { | |
var html = $(this).html().split(" "); | |
html = "<br>" + html[0] + "<br>" + html.slice(1).join(" "); | |
$(this).html(html); | |
first_time = false; | |
}); | |
} | |
if (width > 769 && first_time == false) { | |
$('.tabs #linea-rota').find('br').remove(); | |
//first_time=null; | |
} | |
} |
p1nox
commented
Jan 25, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment