Frage

Ich versuche derzeit 300 Fälle von BlockUI zu erstellen

Zur Zeit kann dies nur durch Kopie erfolgen und fügen Sie:

Zum Beispiel:

 <script type="text/javascript"> 
    $(document).ready(function() { 

        $('#t1').click(function() { 
            $.blockUI({ message: $('#q1'), css: { width: '1024px' } }); 
        }); 

        $('#yes1').click(function() { 
            // update the block message 
            $.blockUI({ message: "<h1>Remote call in progress...</h1>" }); 

            $.ajax({ 
                url: 'wait.php', 
                cache: false, 
                complete: function() { 
                    // unblock when remote call returns 
                    $.unblockUI(); 
                } 
            }); 
        }); 

        $('#no1').click(function() { 
            $.unblockUI(); 
            return false; 
        }); 

    }); 
</script> 

<script type="text/javascript"> 
    $(document).ready(function() { 

        $('#t2').click(function() { 
            $.blockUI({ message: $('#q2'), css: { width: '1024px' } }); 
        }); 

        $('#yes2').click(function() { 
            // update the block message 
            $.blockUI({ message: "<h1>Remote call in progress...</h1>" }); 

            $.ajax({ 
                url: 'wait.php', 
                cache: false, 
                complete: function() { 
                    // unblock when remote call returns 
                    $.unblockUI(); 
                } 
            }); 
        }); 

        $('#no2').click(function() { 
            $.unblockUI(); 
            return false; 
        }); 

    }); 

</script> 

Kann mir jemand einen schnelleren Weg vorschlagen?

War es hilfreich?
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top