2012-03-31 1 views
-1

Ich habe folgendes:Fancybox inline nicht zeigt

in Header:

<script type="text/JavaScript"> 

$(document).ready(function() 
{ 

$(".modal").fancybox({ // for modals pages 
     'autoSize' : true, 
     'type' : 'ajax' 
    }); 

$("#tip5").fancybox({ 
'scrolling'  : 'no', 
'titleShow'  : false 
}); 

$("#zoom").fancybox({ // for modal images 
     'autoScale' : true, 
     'transitionIn' : 'fade', 
     'transitionOut' : 'fade' 
    }); 


</script> 

Und dann meine html:

<a href="#tip5" href="#login_form" title="Lorem ipsum dolor sit amet">Inline</a> 

<div style="display:none"> 
    <form id="login_form" method="post" action=""> 
      <p id="login_error">Please, enter data</p> 
     <p> 
      <label for="login_name">Login: </label> 
      <input type="text" id="login_name" name="login_name" size="30" /> 
     </p> 
     <p> 
      <label for="login_pass">Password: </label> 
      <input type="password" id="login_pass" name="login_pass" size="30" /> 
     </p> 
     <p> 
      <input type="submit" value="Login" /> 
     </p> 
     <p> 
      <em>Leave empty so see resizing</em> 
     </p> 
    </form> 
</div> 

Dies ist nur Inline-Testcode durch die Art und Weise, es zu erhalten zuerst arbeiten!

Wie auch immer, passiert einfach nichts.

Ich benutze Fancybox anderswo auf meiner Website für modale Seiten und Bilder etc und das ist alles in Ordnung, aber inline funktioniert nicht ??

Antwort

-1

Entschuldigung, Entschuldigung Leute - meine Arbeit ist zum Kotzen! Doppel href Problem war

<a href="#tip5" href="#login_form" 

sollte

<a id="tip5" href="#login_form" 
+0

wählen Sie Ihre Antwort als "richtig", um das Problem zu schließen – JFK

0

Sie haben einen Tippfehler:

<a href="#tip5" href="#login-form"... 

vs.

<form id="login_form"... 

der erste ist mit einem Bindestrich (-), der zweite mit einem Unterstrich (_)

+0

Dank, es ist nicht wirklich ein Tippfehler auf dem richtigen Code seiner meine Eingabe sein, ich werde jetzt kopieren und einfügen! Wie auch immer, immer noch nicht funktioniert –

1

Sie zielen

href="#login-form" (with dash) 

aber Ihr Ziel für ms ID ist

<form id="login_form" ... (with underscore) 

so dass der Selektor nicht übereinstimmt. Dumm, nicht wahr? ;)