Recent Topics

1 Nov 01, 2010 21:08    

My b2evolution Version: 3.3.3

I'm having a heck of a time getting JQuery to work properly. I'm trying to use prettyPhoto (http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/documentation/) with no luck. I've put the following code in my _html_header.inc.php file and uploaded that into my skin folder:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" href="operationsomething.com/css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8">
	<script src="operationsomething.com/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>

Then, in a post I put in:

<a href="VCostume.jpg" rel="prettyPhoto[gallery1]" title="You can add caption to pictures."><img src="VCostume.jpg" width="60" height="60" alt="Costume" /></a>

<script type="text/javascript" charset="utf-8"> 
		$(document).ready(function(){
			$("a[rel^='prettyPhoto']").prettyPhoto();
		});
		

But it's still not working...The output is here: http://operationsomething.com/blog4.php. I'm just totally confused here. Can anyone help? Perhaps a "Using JQuery For Beginners" thread would be helpful?

2 Nov 02, 2010 00:00

Replace the above code with this

<link rel="stylesheet" href="http://operationsomething.com/css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8">
<script src="http://operationsomething.com/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>


And add it just before the closing </head> tag

Also edit the following in the same file

add_js_for_toolbar();		// Registers all the javascripts needed by the toolbar menu
require_js( '#jquery#' );
header_content_type();	// Sets charset!

3 Nov 02, 2010 07:43

Awesome! Thanks so much!


Form is loading...