Jump to content


Photo
- - - - -

How Can I Let The Website Load Jquery-1.3.2.js?


Best Answer x69chen , 01 December 2012 - 04:45 AM

ok sorry I made a mistake last night, because of bad internet.

 

Anyway I solved it, thanks for helping :)

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 x69chen

x69chen

    Advanced Member

  • Members
  • 64 posts
  • Framework Version:Pro
  • Country: Country Flag

Posted 30 November 2012 - 08:15 AM

 I added this to my function.php

 

function scripts() {

  if ( !is_admin() ) { // this if statement will insure the following code only gets added to your wp site and not the admin page cause your code has no business in the admin page right unless that's your intentions

 

// your own script 

wp_register_script('yourscript', ( get_bloginfo('template_url') . 'jquery-1.3.2.js'), false); //first register your custom script wp_enqueue_script('swfobject'); // then let wp insert it for you or just delete this and add it directly to your template

// just in case your also interested

wp_register_script('yourJqueryScript', ( get_bloginfo('template_url') . '/yourJquery.js'), array('jquery')); // this last part-( array('jquery') )is added in case your script needs to be included after jquery

wp_enqueue_script('yourJqueryScript'); // then print. it will be added after jquery is added } }

add_action( 'wp_print_scripts', 'scripts'); // now just run the function

but it does not work.

BTW I have already uploaded the jquery-1.3.2.js to my service

 

Could anyone help me,

Thanks



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 16987 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 30 November 2012 - 08:55 AM

Please do not create multiple topics regarding the same issue. jQuery is part of wordpress core, PageLines does not bundle it, if you want to use another version you will have to unqueue it, deregister it then register your version and re-enqueue it. You may find a way on google and the wordpress codex but it is not something we could help you with.

#3 x69chen

x69chen

    Advanced Member

  • Members
  • 64 posts
  • Framework Version:Pro
  • Country: Country Flag

Posted 01 December 2012 - 04:45 AM   Best Answer

ok sorry I made a mistake last night, because of bad internet.

 

Anyway I solved it, thanks for helping :)