خرید بک لینک

Vote count: 0

I was told that jquery was automagically included in wordpress from the get go, but I went ahead and included jquery in my functions.php. I'm trying to do a simple script that scrolls down to a div#id when a link is clicked.

I created this script:

jQuery(document).ready(function($) {
  jQuery("#view-visibility").click(function() {
   JQuery('html, body').animate({
    scrollTop: jQuery("#visibility").offset().top
   }, 2000);
  });
)};

I put the script in my own file, script.js, and added it to the functions.php:

`

function theme_js() {
  //parameters: 1.handle, 2.path, 3.array of dependents, 4.version specification, 5.load in footer? true or false
  wp_enqueue_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js', '', '3.1.1', true );
  wp_enqueue_script( 'bootstrap_js', 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/js/bootstrap.min.js', array('jquery'), '', true );
  wp_enqueue_script( 'my_js', get_template_directory_uri . '/script.js', array('jquery'), '', true );

}

add_action( 'wp_enqueue_scripts', 'theme_js' );`

I still can't get it to work... I don't know what the deal is!! Should I be loading jquery in the head or before the body?

asked 47 secs ago

برچسب: i can't get no satisfaction lyrics,i can't get no satisfaction,i can't get a job,i can't get enough of you,i can't get next to you,i can't get enough,i can't get started,i can't get to sleep,i can't get enough of your love,i can't get the cap off, نویسنده: استخدام کار تاريخ: يکشنبه 11 مهر 1395 ساعت: 21:09

صفحه بندی