[FX.php List] [OFF] JQuery slide left...

Steve Winter steve at bluecrocodile.co.nz
Mon Oct 22 01:38:05 MDT 2012


Bob

the jQuery load() function will take a callback function, so try this

$('.main').hide().load('ticket.php', function() {
	$('.main').show('slide', { direction : 'right'}, 500);
});

That said, when I read http://api.jquery.com/show/ I find two things which may be relevant

> The only easing implementations in the jQuery library are the default, called swing, and one that progresses at a constant pace, called linear. More easing functions are available with the use of plug-ins, most notably the jQuery UI suite.


Have you got the jQueryUI code loaded…? if not, then as this extract explains your code won't know what 'slide' means.

Also, the default jQuery function show() (link above) takes different parameters, in a different order to the JqueryUI show() function http://api.jqueryui.com/show/ You're using the UI  approach, but may not have the UI js loaded in your page (assuming this is the same app as I was looking at you with the other day you don't)



Finally, because you're using a class of .main to act upon, are you certain that in the content coming in the load(), you're not loading a second element with the main class, which may be confusing things…?

HTH

Cheers
Steve


> Hey Michael,
> 
> I tried this, but it never shows me the DIV again:
> 
> var page = 'ticket.php';
> $('.main')
> .hide()  // hide this div
> .load(page)
> .show("slide", { direction: "right" }, 500); // slide in the detail div
> 
> Is the problem that I'm trying to load a DIV, and at the same time slide it out and then back in?
> 
> I was thinking that I could do 2 slides, and it would mimic the look of the DIV moving off to the left. I've been playing with this all day but just can't seem to find the right combo...
> 
> Thanks for your replay!
> 
> BP
> 
> Bob Patin
> Longterm Solutions LLC
> P.O. Box 3408
> Brentwood, TN 37024
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> iChat: bobpatin
> AIM: longterm1954
> Twitter: bobpatin
> Google+: http://www.longtermsolutions.com/plus
> --
> FileMaker 9, 10 & 11 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
> --
> FileMaker hosting and consulting for all versions of FileMaker
> PHP • Full email services • Free DNS hosting • Colocation • Consulting
> 
> On Oct 21, 2012, at 7:18 PM, Head Honcho <headhoncho at customikesolutions.com> wrote:
> 
>> Here's a couple of ways I've done it:
>> 
>> 	$("#backButton").click(function(){
>> 			$("#data").show("slide", { direction: "left" }, 500); // slide back the data div
>> 			$("#detail").hide(); // hide the detail
>> 		});
>> 
>> or
>> 
>> 	$("#saveData").click(function(){
>> 			$("#visit").hide();  // hide this div
>> 			$("#detail").show("slide", { direction: "right" }, 500); // slide in the detail div
>> 		});
>> 
>> 
>> Hope this helps.
>> 
>> Regards
>> 
>> Michael Ward
>> --
>> Head Honcho, CustoMike Solutions
>> Member, FileMaker Business Alliance & FileMaker Technical Network
>> FileMaker 7, 8, 9, 10 & 11 Certified Developer
>> ph 0414 562 501
>> headhoncho at customikesolutions.com
>> 
>> On 22/10/2012, at 10:32 AM, Bob Patin <bob at patin.com> wrote:
>> 
>>> I've been trying to figure out how to slide a DIV left, for an iOS app that I'm working on.
>>> 
>>> I found this:
>>> 
>>> $('#div').hide("slide", { direction: "left" }, 1000);
>>> 
>>> but it doesn't seem to do it when I run it.
>>> 
>>> Here's what I have:
>>> 
>>> var page = 'ticket.php';
>>> $('.main')
>>> .hide("slide", { direction: "left" }, 1000)
>>> .load(page)
>>> .show('slide', { direction:"left" }, 1000);
>>> 
>>> I'm sure it's something stupid, but I've yet to figure out what I'm doing wrong. Any help would be much appreciated.
>>> 
>>> What I'm trying to do is to load a 2nd page into my DIV, sliding the old one out and the new one in; I figured I should probably slide twice...
>>> 
>>> 
>>> 
>>> Bob Patin
>>> Longterm Solutions LLC
>>> P.O. Box 3408
>>> Brentwood, TN 37024
>>> bob at longtermsolutions.com
>>> 615-333-6858
>>> http://www.longtermsolutions.com
>>> iChat: bobpatin
>>> AIM: longterm1954
>>> Twitter: bobpatin
>>> Google+: http://www.longtermsolutions.com/plus
>>> --
>>> FileMaker 9, 10 & 11 Certified Developer
>>> Member of FileMaker Business Alliance and FileMaker TechNet
>>> --
>>> FileMaker hosting and consulting for all versions of FileMaker
>>> PHP • Full email services • Free DNS hosting • Colocation • Consulting_______________________________________________
>>> FX.php_List mailing list
>>> FX.php_List at mail.iviking.org
>>> http://www.iviking.org/mailman/listinfo/fx.php_list
>> 
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

Steve Winter
+44 777 852 4776
steve at bluecrocodile.co.nz



-------------- next part --------------
Skipped content of type multipart/related


More information about the FX.php_List mailing list