Ver Mensaje Individual
  #3 (permalink)  
Antiguo 10/01/2015, 09:37
tavitow
 
Fecha de Ingreso: noviembre-2014
Mensajes: 6
Antigüedad: 9 años, 6 meses
Puntos: 0
Respuesta: Mover DIV al hacer click!

Cita:
Iniciado por mbm150 Ver Mensaje
Hola,

Una forma:
Código HTML:
Ver original
  1. <div class="g-ytsubscribe" id="g-yt" data-channel="CanalYoutube" data-layout="default" data-count="undefined" onclick="this.style.margin = '140px';"></div>

Otra:
Código HTML:
Ver original
  1. <div class="g-ytsubscribe" id="g-yt" data-channel="CanalYoutube" data-layout="default" data-count="undefined" onclick="myFunction(this)"></div>
  2. function myFunction(element) {
  3.     element.style.margin = "140px";
  4. }

Saludos.

Gracias! sirve pero me estoy dando cuenta que al poner el boton de youtube se crea otra div me aparece esto:


Código:
<div id="___ytsubscribe_0" style="text-indent: 0px; margin: -20px; padding: 0px; background: none repeat scroll 0% 0% transparent; border-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; display: inline-block; width: 116px; height: 24px;"><iframe data-gapiattached="true" src="https://www.youtube.com/subscribe_embed?usegapi=1&amp;count=undefined&amp;layout=default&amp;channel=CanalYoutube&amp;origin=http%3A%2F%2Fmalkiel.com.ar&amp;gsrc=3p&amp;ic=1&amp;jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.es.fklblTu3Z78.O%2Fm%3D__features__%2Fam%3DEQ%2Frt%3Dj%2Fd%3D1%2Ft%3Dzcms%2Frs%3DAGLTcCOK83c4tmj_GDN-HFPAIcVk3K7Qcw#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh%2Conload&amp;id=I0_1420904372064&amp;parent=http%3A%2F%2Fmalkiel.com.ar&amp;pfname=&amp;rpctoken=31189504" name="I0_1420904372064" id="I0_1420904372064" vspace="0" tabindex="0" style="position: static; top: 0px; width: 116px; margin: 0px; border-style: none; left: 0px; visibility: visible; height: 24px;" scrolling="no" marginwidth="0" marginheight="0" hspace="0" frameborder="0" width="100%"></iframe></div>

Osea que lo que haga en el div de youtube no le afecta habria una forma de agregarle lo mismo ?