Support » Plugins » Hacks » replace .copy-paste with on page load?

  • I was wondering if anyone might know how to change this code so the copy-paste function is changed to a function that just pastes when the page loads, without the click?

    In functions.php

    function imath_copy_paste(){
    		{	?>
    		<script type="text/javascript">
    				var shortcode = jQuery(this).find(":first").val();

    In a custom page template:

    <div class="copy-paste">
    	<input type="hidden" id="copy-paste-shortcode" value="[xilipostinpost query='name=<?php echo $post->post_name;?>']&nbsp;"	<a href="javascript:void(0)" title="click here to add this contnent to the entry form on the right.">add this entry to my trip!</a>

    I don’t really know Java, hoping it’s a simple adjustment.


  • The topic ‘replace .copy-paste with on page load?’ is closed to new replies.