Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/08/2014, 10:28
miguelalexep
 
Fecha de Ingreso: febrero-2014
Ubicación: Hermosillo, Sonora
Mensajes: 86
Antigüedad: 10 años, 3 meses
Puntos: 0
Respuesta: Boton para ocultar divs

{% for object in list.object_list %}
<a style="color: #fff;background-color: #115095;border-radius: 10px;" class="ocultar" href="#">Mostrar/Ocultar</a><br>

{% for ad in object.detalles.all %}
<div class="abonos">
<div class="{% if object.cancelado %} red{% endif %}">
<div style="width:70px; float:left;">{{ ad.movimiento.fecha_factura|date:"d/m/y" }}</div>
<div style="width:100px; float:left;">{{ ad.movimiento.tipo_documento }}</div>
<div style="width:50px; float:left;" class="righttext">{{ ad.movimiento.get_folio }}</div>
<div style="width:50px; float:left;" class="righttext">{{ ad.dias_vencidos }}</div>
<div style="width:100px; float:left;" class="righttext">{{ ad.movimiento.total|cur }}</div>
<div style="width:100px; float:left;" class="righttext">{{ ad.importe|cur }}</div>
<div class="clear"></div>
</div>
</div>
{% endfor %}
{% for n in object.notas_credito_abono.all %}
<div>
<div style="width:70px; float:left;">{{ n.fecha|date:"d/m/y" }}</div>
<div style="width:100px; float:left;">Nota de crédito</div>
<div style="width:50px; float:left;" class="righttext">{{ n.get_folio }}</div>
<div style="width:50px; float:left;" class="righttext">&nbsp;</div>
<div style="width:100px; float:left;" class="righttext">{{ n.total }}</div>
<div style="width:100px; float:left;" class="righttext">{{ n.total }}</div>
<div class="clear"></div>
</div><br>
{% endfor %}
</a></div>
<div>&nbsp;</div>
{% endfor %}


Y Aqui esta el Jquery

<script>
$(document).ready(function(){
$("#id_year").val('{{ year }}');
$("#id_month").val('{{ month }}');
$("#id_search").val('{{ q }}');
$('.ocultar').click(function(){
$('.abonos').slideToggle(100);
});
});
</script>