This file contains hidden or 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
| //row markup | |
| $row = '<div class="row-fluid">%s</div>' | |
| //$posts = whatever you are trying to put in a grid. | |
| $span_divs = array(); | |
| foreach ( $posts as $post ) { | |
| //make a span box | |
| $span_divs[] = sprintf( "<div class="span4">%s</div>" , $post); | |
| } | |
| //chunk the array of grid items into a number if items |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
| <script> | |
| function ordenarSelect(id_componente) | |
| { | |
| var selectToSort = jQuery('#' + id_componente); | |
| var optionActual = selectToSort.val(); |
This file contains hidden or 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
| function number_format(amount, decimals) { | |
| amount += ''; // por si pasan un numero en vez de un string | |
| amount = parseFloat(amount.replace(/[^0-9\.]/g, '')); // elimino cualquier cosa que no sea numero o punto | |
| decimals = decimals || 0; // por si la variable no fue fue pasada | |
| // si no es un numero o es igual a cero retorno el mismo cero | |
| if (isNaN(amount) || amount === 0) | |
| return parseFloat(0).toFixed(decimals); |