vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Using this code in a template - Any ideas how? (https://vborg.vbsupport.ru/showthread.php?t=213925)

Sweeks 05-17-2009 08:10 PM

Using this code in a template - Any ideas how?
 
I am wanting to use this code but cant and I am not sure why it isnt working within the templates, the install instructions ask me to please this after calling the script between the <head></head> tags but when I do it displays this on the browser when it shouldnt. It is part of a Jquery script:

Code:

jQuery(document).ready(function($) {
  $('a[rel*=facebox]').facebox()
})

Hope someone can help, I think it may be to do with the $ sign.

Thank you.
________
Persian Cooking

Lynne 05-17-2009 08:20 PM

You should ask for help at the place you got the install instructions.

RLShare 05-17-2009 08:28 PM

Are you putting the code inside of 'script' tags?

Sweeks 05-17-2009 08:28 PM

I doubt I will get any help as theyre just Jquery coders and probably dont use vbulletin, the script works fine outside of vbulletin that's why I asked for some help on here if anyone knows how to get it to work.

RLshare:

I have put the code outside of the script tags yes, is this incorerect? If so, Is it meant to be within the script tags?
________
Georgian recipes

RLShare 05-17-2009 08:31 PM

Anytime you put client side script in a page, it needs to be within script tags to tell the browser that it is a script to be executed and not content to be displayed.. with the exception of actually putting the script in the markup
Code:

<script type="text/javascript">
//Your code
</script>


Sweeks 05-17-2009 10:59 PM

Thank you, I havent had much experience with jquery or JS but you learn something new every day, thanks for this RLShare, it works perfectly :)
________
MAGIC FLIGHT


All times are GMT. The time now is 09:18 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01114 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete