skip to Main Content

Show and hide div with ajax content – Jquery ajax

I have this code: <div id="product_<?php echo $product->id; ?>"></div> This is ajax js code: $(function () { $('.expand').on('click', function (e) { e.preventDefault(); var token = "<?php echo $this->security->get_csrf_token_name(); ?>"; var hash = "<?php echo $this->security->get_csrf_hash(); ?>"; var productID = $(this).data("id");…

VIEW QUESTION

Passing variables through php and jquery in wordpress

I am using wordpress and have the following code on functions.php file function fun1() { wp_enqueue_script( 'aldi_code', 'wp-content/uploads/custom-css-js/675.js', array( 'jquery' ), false, true ); wp_localize_script( 'aldi_code', 'test', array( 'current_user' => wp_get_current_user() ) ) ; } add_action( 'wp_enqueue_scripts', 'fun1' ); I…

VIEW QUESTION
Back To Top
Search