theaeblackthorn: (Default)
Ahaha, you can launch a fancybox from within a fancybox by targeting the parent


This should be in the existing fancybox, with the link


$(".btn_forgot").click(function() {
parent.$.fancybox({
href: $(this).attr('href'),
autoSize: false,
padding: 0,
scrolling: 'no',
width: 750,
height: 387,
fitToView: false,
openEffect: 'elastic',
type: 'iframe'
});
});



<a href="<?php echo base_url(); ?>index.php/member/forgottenpassword" class="btn_forgot fancybox.iframe">Forgotten your password?</a>



and both the iframe and the parent should have jquery and fancybox installed and bam, job done.
theaeblackthorn: (Default)
Moving a wordpress install and getting:

download as application/x-httpd-php ?

Check there's no php legacy stuff in your htaccess.
theaeblackthorn: (Default)
Because I always forget this..., restarting mysql via the terminal on a mac

Start:

sudo /usr/local/mysql/support-files/mysql.server start

Stop:

sudo /usr/local/mysql/support-files/mysql.server stop
theaeblackthorn: (Default)
Yeah XSS filtering turned on in codeigniter will stop tiny mce saving 'style' attributessss
theaeblackthorn: (Default)
waypoints. New favourite jquery plugin \o///


		$.waypoints.settings.scrollThrottle = 30;
		
		$('#module_nav_3').waypoint(function(event, direction) {
			if (direction === "down")
			{
				$(this).parent().parent().toggleClass('sticky');
				laoffset = 45;
			} else {
				$(this).parent().parent().toggleClass('sticky');
				laoffset = 0;
			}
			
			event.stopPropagation();
		});

	
		$('#scroll_point_two').waypoint(function(event, direction) {
			if (direction === "down")
			{
				$('#module_nav_wrapper img').animate({ left: "280px" }, { duration: 'fast', easing: 'swing'});		
			} else {
				$('#module_nav_wrapper img').animate({ left: "82px" }, { duration: 'fast', easing: 'swing'});		
			}
			event.stopPropagation();
		});


theaeblackthorn: (Default)
If you AJAX a facebook like, and a twitter 'tweet this' in, you'll find they don't work.

This is because they fire on a DOM event that isn't fired by an AJAX load, only fired by a thingy load.

Most of the posts out there to solve it are out of date/not answered.

For Twitter
The fix that is used is now out of date, that's because it was a hack that is no longer supported. The only solution, and infact the recommended one is to use the iframe instead of the javascript pull in.

For Facebook
Facebook have been a load smarter. this explains it.

The summary is call this on ajax complete function: FB.XFBML.parse();

Boom, job done.

Profile

theaeblackthorn: (Default)
theaeblackthorn

February 2013

S M T W T F S
     12
3 456789
10111213141516
17181920212223
2425262728  

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 22nd, 2017 02:31 am
Powered by Dreamwidth Studios