Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #547157

    Hola,
    Quiero añadir este script a una de mis paginas.

    <script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/
    libs/jquery/1.3.0/jquery.min.js”></script>
    <script type=”text/javascript”>
    $(function()
    {
    $(“.word”).keyup(function()
    {
    var word=$(this).val();
    $(“.word_preview”).html(word);
    return false;
    });
    });
    </script>

    Y luego en un code block, añadir el html:

    <input type=”text” name=”word” class=”word” />
    La palaver escrita es:<span class=”word_preview”></span>

    He leído varios posts sobre como hacerlo y ser que tengo que crear el archivo custom.js y luego añadir la función wp_enqueue_script al archivo functions.php, pero no consigo dar con el código que me funcione.

    Muchas gracias.

    #547964

    Hi IbanGarolera!

    Please try adding following code to Functions.php file in Appearance > Editor

    function add_custom_wplogin(){
    ?>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/
    libs/jquery/1.3.0/jquery.min.js"></script>
    <script type="text/javascript">
    jQuery(function()
    {
    jQuery(".word").keyup(function()
    {
    var word=jQuery(this).val();
    jQuery(".word_preview").html(word);
    return false;
    });
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_wplogin');

    Regards,
    Yigit

    #550268

    Hi Yigit,

    Sorry, but it doesn’t work.

    Thank you!

    #550432

    Hi!

    Do you mind creating a temporary admin login and posting it here privately? Also, please elaborate on the changes you would like to make

    Regards,
    Yigit

    #551003

    Hi,
    What i really want to do is a form created with calculated fields form where user can select their products and he can see the summary of his selection in the same page.

    #551005

    Hey!

    Do you also have a link to a page where we can see a working example?

    Cheers!
    Yigit

    #551013

    I have a link but it is with text.
    http://www.tutorialsmade.com/live-preview-jquery-demo/
    but i really want to do with my form

    #552338

    Hi!

    link you have provided shows a tutorial instead of a working example showing the results you want to achieve. We still don’t know what you want to do exactly, so please send us an example.

    Regards,
    Andy

    #552528
    #552956

    Hi!

    the theme is not made for such functions. You would need to search a 3rd party plugin or hire a freelance developer for this job.

    Best regards,
    Andy

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.