[jQuery] Re: cluetip ajax authentication

2009-04-19 Thread DotnetShadow

Hi there,

I just tried your local code but I seem to be having problems with the
beforeSend event
var c = 1;

 $(".ic").cluetip(
{
ajaxSettings: {
cache: true,
type: "POST",
data: "{username:'" + username + "', c:" + c +
"}",
contentType: "application/json;
charset=utf-8",
dataType: "json",
beforeSend: function(xhr) {
xhr.setRequestHeader("X-MicrosoftAjax",
"Delta=true");  <--- ERROR: setRequestHeader doesn't exist
}

},
ajaxProcess: function(data1) {
return data1.d;
}

.
.
.
.

The problem is that I have no access to the xhr object hence I get the
error:  "setRequestHeader" is not available, the only thing I have
access to is the cluetip itself. So how can I actually set a header by
overriding the beforeSend() method? The same problem will actually
happen with the error callback where we won't be able to tell the
status of xhr ie. xhr.status etc

Is it possible to have access to the the request object?

Regards DotnetShadow

On Apr 19, 12:19 pm, Karl Swedberg  wrote:
> Yes, absolutely. You can add your own function to any of the $.ajax  
> callback functions in the ajaxSettings option now. Your function will  
> be queued first for beforeSend, complete, and success, after which the  
> plugin's code will run. For error, however, yours will completely  
> override the default.
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Apr 18, 2009, at 9:41 PM, DotnetShadow wrote:
>
>
>
> > Thanks for getting back to me,
>
> > You are correct I had to modify the script hence it was a temporary
> > fix, but now that I can use my own beforeSend() that makes it handy.
>
> > Does this mean the error callback can also be defined to the
> > ajaxSettings option?
> > The reason I ask is because sometimes you would like your application
> > to redirect to the login page if the forms authentication has expired
> > instead of having the message say "content could not be loaded..."
>
> > Thanks once again
> > DonetShadow
>
> > On Apr 18, 11:29 pm, Karl Swedberg  wrote:
> >> On Apr 17, 2009, at 11:50 PM, DotnetShadow wrote:
>
> >>> Thanks for that, I haven't tried it yet.
> >>> Does that mean we can now override the error and beforesend method?
> >>> What happens when there is a redirec? Your documentation hasn't been
> >>> updated, so not sure what the default behaviour is?
>
> >>> I actually temporarly solved it using this:
> >>> cluetip plugin - Need beforeSend() and error handling override
> >>>http://groups.google.com/group/jquery-en/browse_thread/thread/
> >>> 74ed458...
>
> >>> But I will have a go at your new implementation to see how it works
>
> >> I don't really see a solution in that post, other than to modify the
> >> plugin script itself, which, of course, isn't advisable. Am I missing
> >> something?
>
> >> if you pull down the most recent version from GitHub now, you can  
> >> just
> >> add your own beforeSend callbacks to the ajaxSettings option.
>
> >> --Karl
>
> >> 
> >> Karl Swedbergwww.englishrules.comwww.learningjquery.com


[jQuery] Re: jQuery Cycle plugin - addslide (again)

2009-04-19 Thread ppblaauw

Ok, found the solution.

I am not using the slideExpr but the parent of the container to add
slides and it works.
Also with the a pageranchorbuilder it works when I append the new
pager items.

What is missing is to keep track of images already loaded in the
jQuery script to prevent that images are loaded twice when the user
navigates to e.g. slide 1, slide 3 would loaded again.
So i think I have to keep track of the images already loaded in an
array and don't load them again. Maybe also need some code if the user
navigates to the last image, because then one image would not be
loaded.

If anyone is interested to develop this further please let me know.

On Apr 18, 2:20 pm, ppblaauw  wrote:
> Experimented some more:
>
> When I add
>
> opts.addSlide(ddblockGetSlideHTML(data.slideImg), fwd == false);
>
> The images are appended after the other images, but still not in the
> slideExpr
>
> When I add
>
> opts.$cont = '#ddblock-' + opts.ddblocknr + ' .ddblock-container';
>
> before the addslide
>
> It puts the slide in the content container I want but after adding one
> slide the slideshow stops
>
> Anyone having suggestion how to append slides with addSlide in the
> parent of the container defined with slideExpr
>
> Thanks
>
> Philip Blaauw
>
> On Apr 14, 7:30 am, ppblaauw  wrote:
>
> > Maybe the issue is really addSlide in combination with slideExpr.
>
> > When images are added they are prepended instead of appended.
>
> > So the issue will be how to use slideExpr with addSlide.
>
> > If more info is needed, please let me know
>
> > On Apr 13, 8:12 am, ppblaauw  wrote:
>
> > > I read a lot of posts about this issue, but can not find a solution.
> > > Also have seen the addSlide examples for the jQuerycycleplugin.
>
> > > I try to add slides to thecycleplugin with AJAX, one slide at a time
> > > with the following code.
>
> > >   function onBefore(curr, next, opts, fwd) {
> > >     // on Before arguments:
> > >     //  curr == DOM element for the slide that is currently being
> > > displayed
> > >     //  next == DOM element for the slide that is about to be
> > > displayed
> > >     //  opts == slideshow options
> > >     //  fwd  == true if cycling forward, false if cycling backward
>
> > >     //Slide html creation helper.
> > >     function ddblockGetSlideHTML(slideImg) {
> > >       return ' > > alt=""/>';
> > >     };
>
> > >     opts.ajaxLoadSlides = 1; // Will be set later from UI
> > >     opts.totalSlideCount = 6; //Will be set later from UI
> > >     //load slides dynamically
> > >     if (opts.ajaxLoadSlides) {
>
> > >       // on the first pass, addSlide is undefined (pluginhasn't yet
> > > created the fn);
> > >       // when we're finshed adding slides we'll null it out again
> > >       if (!opts.addSlide){
> > >         return;
> > >       }
>
> > >       if (opts.nextSlide + 1 == opts.totalSlideCount) {
> > >         // final slide in our slide slideshow is about to be displayed
> > >         // so there are no more to fetch
> > >         alert('last slide to be dislayed, nothing to add anymore');
> > >         opts.addSlide = null;
> > >         return;
> > >       }
>
> > >       // Retrieve slide from server via AJAX, call; if successful the
> > >       // anonymous function in voteSaved is run.
> > >       $.ajax({
> > >         type: 'POST', // Use the POST method.
> > >         url: 'get_image_slides',
> > >         dataType: 'json',
> > >         data:
> > > {js:true,origin:'ddblock',curr_slide:opts.currSlide,next_slide:opts.nextSli
> > >  de,delta:opts.ddblocknr},
> > >         success: function(data) {
> > >           // add our next slide
> > >           opts.addSlide(ddblockGetSlideHTML(data.slideImg), fwd ==
> > > true);
> > >         },
> > >         error: function(xhr) {
> > >           //alert('Error: ' + xhr.status + ' ' + xhr.statusText);
> > >         }
> > >       });
> > >     }
> > >   }
>
> > > I first have 2 initial images
> > > after that, images are loaded with AJAX
> > > The ajax call returns the image ok
> > > The problem is that opts.currSlide and opts.Nextslide give strange
> > > values so the wrong images are selected.
> > > When I look in FF console the post values for currSlide and nextSlide
> > > are.
>
> > > 0 - 1
> > > 2 - 1
> > > 2 - 3
> > > 4 - 1
> > > 2 - 3
> > > 4 - 5
>
> > > I get the images in the PHP script on nextSlide +2
> > > So i expect :
> > > 0 - 1 -> get image 3
> > > 1 - 2 -> get image 4
> > > 2 - 3 -> get image 5
> > > 3 - 4 -> get image 6
>
> > > Another problem is I use slideExpr to select the right content to
> > > slide.
> > > How can I you use addslide to add slides to the SlideExpr.parent
>
> > > Thanks in advance for any help with this issue
>
> > > Philip Blaauw


[jQuery] Re: hover and/or fadeTo breaking layout in IE 6 and 7

2009-04-19 Thread Jonathan

Anyone come across something like this before?

I understand it's easy enough to keep IE 6/7 from implementing the
script --  if($.browser.msie && $.browser.version < 8) return; -- but
I'd like to get IE working with this if possible.

On Apr 20, 1:02 am, Jonathan  wrote:
> Sorry, forgot to include a link. You can see the IE bug here:
>
> http://themes.nimblehost.com/preview/sleek/test/
>
> On Apr 19, 10:46 pm, Jonathan  wrote:
>
>
>
> > I'm using jquery to add a smooth fade effect when users mouse over a
> > menu item. The site has split navigation, with this effect applied to
> > all menu items on the page. Hovering over the main top navigation
> > works fine, but hovering of menu items in the second and third level
> > split menu (IE 7) causes the content area to shorten by about 50px. In
> > IE 6, the page displays properly until the script is applied, then the
> > content area is automatically shortened by about 50px (before the user
> > hovers over the secondary menus).
>
> > Would appreciate any pointers on how to fix this issue. Google
> > searches have yielded very little about this - the closest thing I've
> > come across is an offsetWidth bug that doesn't quite fit the problem
> > I'm having, and the solution doesn't work in my case.
>
> > Many thanks~
>
> > Jonathan


[jQuery] Re: How to run cf regex (or regular regex) on this code?

2009-04-19 Thread Ricardo

Good to see you managed it, I forgot to add the global flag. Yet,
doing that replace in your storyStruct.QGETSTORYINFO method server-
side (if that is possible, i've no idea) would certainly be a lot
faster.

cheers,
- ricardo

On Apr 20, 12:09 am, Rick Faircloth  wrote:
> Ahh...found a one-letter js solution.
>
> There is no replaceAll function in js.  However, adding a "g" modifier
> changes a single occurrence replace function to a replace all function.
>
> So, using out.push('' + row[4].replace(/\r?\n/g,
> '') + '');
> causes all the line feeds to be replaced by  .
>
> However, I appreciate the idea for how to do this in CFML.  There will come
> a time,
> I'm sure when it's preferable, or perhaps, even necessary.  And I do like
> the idea
> of modifying the data before sending it back, instead of afterwards...more
> flexibility.
>
> Rick
>
> On Sun, Apr 19, 2009 at 9:53 PM, Charlie Griefer
> wrote:
>
>
>
>
>
> > wasn't meant to be quite as "snippy" as it came across.  new laptop,
> > and i had set the touchpad to click "on tap"... well, the tap is very
> > sensitive and i tapped inadvertently and sent the msg prior to adding
> > a smiley.
>
> > don't get me wrong, there was a certain amount of snippiness
> > intended... but not 100% snip :)
>
> > anyway, back on topic... i still say play to your strengths and return
> > the data in the format that's as close as possible to what you want it
> > to be.  write a utility method that takes the query object as an
> > argument, does the replace on the text, and passes back an array of
> > structs.  this way, you're not bound to returning the data in that
> > format.  you can still return it as a query (if you want), or you can
> > pass it off to the new method that converts it.
>
> > or, just to blow your mind, you can do the replace in the SQL and
> > return to CF exactly what you need :)
>
> > On Sun, Apr 19, 2009 at 6:47 PM, Rick Faircloth
> >   wrote:
> > > Now, Charlie...no need to be so "snippy".  :o)
>
> > > Just because I have complaints that JS isn't like CF in some ways,
> > > doesn't mean I don't want to grow in my understanding and application of
> > JS.
>
> > > Anyway, your method is a lot more code, and may be slower than
> > > using the replace in the JS.
>
> > > I just wanted to see how it performed.
>
> > > Now, I think it's about bedtime for someone ;o)
>
> > > Rick
>
> > > On Sun, Apr 19, 2009 at 7:22 PM, Charlie Griefer <
> > charlie.grie...@gmail.com>
> > > wrote:
>
> > >> On Sun, Apr 19, 2009 at 3:58 PM, Rick Faircloth
> > >>  wrote:
> > >> > That worked, Ricardo...to a point.
> > >> > (Haven't tried your solution, Charlie...)
>
> > >> > I actually just embedded the replace function in the code like this:
>
> > >> > out.push('' + row[4].replace(/\r?\n/,
> > '')
> > >> > +
> > >> > '');
>
> > >> > and that worked, but only for the first line break in the text.
>
> > >> > I tried adding 'all', like I do when I use the replace function in
> > CFML,
> > >> > but it had no effect.
>
> > >> > ...'', 'all') + '');
>
> > >> > Suggestions?
>
> > >> Sure.  I suggest you return the data in the format that you need it to
> > be
> > >> in.
>
> > >> You've complained in the past that JS isn't like CF.  Here's a place
> > >> where you can play to your strengths and manipulate the string prior
> > >> to returning it from the remote CFC call.
>
> > >> --
> > >> I have failed as much as I have succeeded. But I love my life. I love
> > >> my wife. And I wish you my kind of success.
>
> > > --
>
> > -
> > > "It has been my experience that most bad government is the result of too
> > > much government." - Thomas Jefferson
>
> > --
> >  I have failed as much as I have succeeded. But I love my life. I love
> > my wife. And I wish you my kind of success.
>
> --
> -
> "It has been my experience that most bad government is the result of too
> much government." - Thomas Jefferson


[jQuery] Re: How to run cf regex (or regular regex) on this code?

2009-04-19 Thread Rick Faircloth
Ahh...found a one-letter js solution.

There is no replaceAll function in js.  However, adding a "g" modifier
changes a single occurrence replace function to a replace all function.

So, using out.push('' + row[4].replace(/\r?\n/g,
'') + '');
causes all the line feeds to be replaced by  .

However, I appreciate the idea for how to do this in CFML.  There will come
a time,
I'm sure when it's preferable, or perhaps, even necessary.  And I do like
the idea
of modifying the data before sending it back, instead of afterwards...more
flexibility.

Rick

On Sun, Apr 19, 2009 at 9:53 PM, Charlie Griefer
wrote:

>
> wasn't meant to be quite as "snippy" as it came across.  new laptop,
> and i had set the touchpad to click "on tap"... well, the tap is very
> sensitive and i tapped inadvertently and sent the msg prior to adding
> a smiley.
>
> don't get me wrong, there was a certain amount of snippiness
> intended... but not 100% snip :)
>
> anyway, back on topic... i still say play to your strengths and return
> the data in the format that's as close as possible to what you want it
> to be.  write a utility method that takes the query object as an
> argument, does the replace on the text, and passes back an array of
> structs.  this way, you're not bound to returning the data in that
> format.  you can still return it as a query (if you want), or you can
> pass it off to the new method that converts it.
>
> or, just to blow your mind, you can do the replace in the SQL and
> return to CF exactly what you need :)
>
> On Sun, Apr 19, 2009 at 6:47 PM, Rick Faircloth
>   wrote:
> > Now, Charlie...no need to be so "snippy".  :o)
> >
> > Just because I have complaints that JS isn't like CF in some ways,
> > doesn't mean I don't want to grow in my understanding and application of
> JS.
> >
> > Anyway, your method is a lot more code, and may be slower than
> > using the replace in the JS.
> >
> > I just wanted to see how it performed.
> >
> > Now, I think it's about bedtime for someone ;o)
> >
> > Rick
> >
> > On Sun, Apr 19, 2009 at 7:22 PM, Charlie Griefer <
> charlie.grie...@gmail.com>
> > wrote:
> >>
> >> On Sun, Apr 19, 2009 at 3:58 PM, Rick Faircloth
> >>  wrote:
> >> > That worked, Ricardo...to a point.
> >> > (Haven't tried your solution, Charlie...)
> >> >
> >> > I actually just embedded the replace function in the code like this:
> >> >
> >> > out.push('' + row[4].replace(/\r?\n/,
> '')
> >> > +
> >> > '');
> >> >
> >> > and that worked, but only for the first line break in the text.
> >> >
> >> > I tried adding 'all', like I do when I use the replace function in
> CFML,
> >> > but it had no effect.
> >> >
> >> > ...'', 'all') + '');
> >> >
> >> > Suggestions?
> >>
> >> Sure.  I suggest you return the data in the format that you need it to
> be
> >> in.
> >>
> >> You've complained in the past that JS isn't like CF.  Here's a place
> >> where you can play to your strengths and manipulate the string prior
> >> to returning it from the remote CFC call.
> >>
> >> --
> >> I have failed as much as I have succeeded. But I love my life. I love
> >> my wife. And I wish you my kind of success.
> >>
> >
> >
> >
> > --
> >
> -
> > "It has been my experience that most bad government is the result of too
> > much government." - Thomas Jefferson
> >
>
>
>
> --
>  I have failed as much as I have succeeded. But I love my life. I love
> my wife. And I wish you my kind of success.
>
>


-- 
-
"It has been my experience that most bad government is the result of too
much government." - Thomas Jefferson


[jQuery] Re: cluetip ajax authentication

2009-04-19 Thread DotnetShadow

Hi there,

I just tried your local code but I seem to be having problems with the
beforeSend event
var c = 1;

 $(".ic").cluetip(
{
ajaxSettings: {
cache: true,
type: "POST",
data: "{username:'" + username + "', c:" + c +
"}",
contentType: "application/json;
charset=utf-8",
dataType: "json",
beforeSend: function(xhr) {
xhr.setRequestHeader("X-MicrosoftAjax",
"Delta=true");  <--- ERROR: setRequestHeader doesn't exist
}

},
ajaxProcess: function(data1) {
return data1.d;
}

.
.
.
.

The problem I have is that it doesn't recognize the "setRequestHeader"
method for some reason? Am I setting the header wrong?

Regards DotnetShadow


On Apr 19, 12:19 pm, Karl Swedberg  wrote:
> Yes, absolutely. You can add your own function to any of the $.ajax  
> callback functions in the ajaxSettings option now. Your function will  
> be queued first for beforeSend, complete, and success, after which the  
> plugin's code will run. For error, however, yours will completely  
> override the default.
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Apr 18, 2009, at 9:41 PM, DotnetShadow wrote:
>
>
>
> > Thanks for getting back to me,
>
> > You are correct I had to modify the script hence it was a temporary
> > fix, but now that I can use my own beforeSend() that makes it handy.
>
> > Does this mean the error callback can also be defined to the
> > ajaxSettings option?
> > The reason I ask is because sometimes you would like your application
> > to redirect to the login page if the forms authentication has expired
> > instead of having the message say "content could not be loaded..."
>
> > Thanks once again
> > DonetShadow
>
> > On Apr 18, 11:29 pm, Karl Swedberg  wrote:
> >> On Apr 17, 2009, at 11:50 PM, DotnetShadow wrote:
>
> >>> Thanks for that, I haven't tried it yet.
> >>> Does that mean we can now override the error and beforesend method?
> >>> What happens when there is a redirec? Your documentation hasn't been
> >>> updated, so not sure what the default behaviour is?
>
> >>> I actually temporarly solved it using this:
> >>> cluetip plugin - Need beforeSend() and error handling override
> >>>http://groups.google.com/group/jquery-en/browse_thread/thread/
> >>> 74ed458...
>
> >>> But I will have a go at your new implementation to see how it works
>
> >> I don't really see a solution in that post, other than to modify the
> >> plugin script itself, which, of course, isn't advisable. Am I missing
> >> something?
>
> >> if you pull down the most recent version from GitHub now, you can  
> >> just
> >> add your own beforeSend callbacks to the ajaxSettings option.
>
> >> --Karl
>
> >> 
> >> Karl Swedbergwww.englishrules.comwww.learningjquery.com


[jQuery] Re: Getting started with jQuery

2009-04-19 Thread Sam Sherlock
try the following
http://www.learningjquery.com/category/levels/beginner
www.*slideshare*.net/simon/*jquery*-in-15-minutes
http://www.slideshare.net/remy.sharp/prototype-jquery-going-from-one-to-the-other

- S


2009/4/20 yrstruly 

>
> Hello
>
> Can somebody maybe please give me a basic code to start testing
> jQuery, cause the beginners code on this site is not doing anything
> for me?
>
> Thank you
>
>


[jQuery] Getting started with jQuery

2009-04-19 Thread yrstruly

Hello

Can somebody maybe please give me a basic code to start testing
jQuery, cause the beginners code on this site is not doing anything
for me?

Thank you



[jQuery] Re: How to run cf regex (or regular regex) on this code?

2009-04-19 Thread Charlie Griefer

wasn't meant to be quite as "snippy" as it came across.  new laptop,
and i had set the touchpad to click "on tap"... well, the tap is very
sensitive and i tapped inadvertently and sent the msg prior to adding
a smiley.

don't get me wrong, there was a certain amount of snippiness
intended... but not 100% snip :)

anyway, back on topic... i still say play to your strengths and return
the data in the format that's as close as possible to what you want it
to be.  write a utility method that takes the query object as an
argument, does the replace on the text, and passes back an array of
structs.  this way, you're not bound to returning the data in that
format.  you can still return it as a query (if you want), or you can
pass it off to the new method that converts it.

or, just to blow your mind, you can do the replace in the SQL and
return to CF exactly what you need :)

On Sun, Apr 19, 2009 at 6:47 PM, Rick Faircloth
 wrote:
> Now, Charlie...no need to be so "snippy".  :o)
>
> Just because I have complaints that JS isn't like CF in some ways,
> doesn't mean I don't want to grow in my understanding and application of JS.
>
> Anyway, your method is a lot more code, and may be slower than
> using the replace in the JS.
>
> I just wanted to see how it performed.
>
> Now, I think it's about bedtime for someone ;o)
>
> Rick
>
> On Sun, Apr 19, 2009 at 7:22 PM, Charlie Griefer 
> wrote:
>>
>> On Sun, Apr 19, 2009 at 3:58 PM, Rick Faircloth
>>  wrote:
>> > That worked, Ricardo...to a point.
>> > (Haven't tried your solution, Charlie...)
>> >
>> > I actually just embedded the replace function in the code like this:
>> >
>> > out.push('' + row[4].replace(/\r?\n/, '')
>> > +
>> > '');
>> >
>> > and that worked, but only for the first line break in the text.
>> >
>> > I tried adding 'all', like I do when I use the replace function in CFML,
>> > but it had no effect.
>> >
>> > ...'', 'all') + '');
>> >
>> > Suggestions?
>>
>> Sure.  I suggest you return the data in the format that you need it to be
>> in.
>>
>> You've complained in the past that JS isn't like CF.  Here's a place
>> where you can play to your strengths and manipulate the string prior
>> to returning it from the remote CFC call.
>>
>> --
>> I have failed as much as I have succeeded. But I love my life. I love
>> my wife. And I wish you my kind of success.
>>
>
>
>
> --
> -
> "It has been my experience that most bad government is the result of too
> much government." - Thomas Jefferson
>



-- 
I have failed as much as I have succeeded. But I love my life. I love
my wife. And I wish you my kind of success.


[jQuery] Re: How to run cf regex (or regular regex) on this code?

2009-04-19 Thread Rick Faircloth
Now, Charlie...no need to be so "snippy".  :o)

Just because I have complaints that JS isn't like CF in some ways,
doesn't mean I don't want to grow in my understanding and application of JS.

Anyway, your method is a lot more code, and may be slower than
using the replace in the JS.

I just wanted to see how it performed.

Now, I think it's about bedtime for someone ;o)

Rick

On Sun, Apr 19, 2009 at 7:22 PM, Charlie Griefer
wrote:

>
> On Sun, Apr 19, 2009 at 3:58 PM, Rick Faircloth
>  wrote:
> > That worked, Ricardo...to a point.
> > (Haven't tried your solution, Charlie...)
> >
> > I actually just embedded the replace function in the code like this:
> >
> > out.push('' + row[4].replace(/\r?\n/, '') +
> > '');
> >
> > and that worked, but only for the first line break in the text.
> >
> > I tried adding 'all', like I do when I use the replace function in CFML,
> > but it had no effect.
> >
> > ...'', 'all') + '');
> >
> > Suggestions?
>
> Sure.  I suggest you return the data in the format that you need it to be
> in.
>
> You've complained in the past that JS isn't like CF.  Here's a place
> where you can play to your strengths and manipulate the string prior
> to returning it from the remote CFC call.
>
> --
>  I have failed as much as I have succeeded. But I love my life. I love
> my wife. And I wish you my kind of success.
>
>


-- 
-
"It has been my experience that most bad government is the result of too
much government." - Thomas Jefferson


[jQuery] Re: How to rewrite this in jQuery?

2009-04-19 Thread Dave Methvin

> How can I make jQuery read say this code:
>
> 
> 
>
> and replace the 'rel' with 'id' ? Or is this asking too much?

How about this?

$("div[rel]").each(function(){
   $(this).attr("id", $(this).attr("rel"));
});


[jQuery] Best tooltip plug-in -- opinions?

2009-04-19 Thread René

There are so many to choose from, I'd like to hear some opinions.

1. Relatively lean and fast. 200+ KB seems, to me, ridiculously large.
2. Ridiculously good-looking.
3. Compatible. Firefox, IE 6/7, Safari, etc.

Opinions?

...Rene


[jQuery] Re: js query and wordpress. Cluetip stops working

2009-04-19 Thread Karl Swedberg
I was just in the process of pulling down your files again and placing  
them up on a test server when I noticed that you seem to have  
abandoned your attempt to use the plugin and went with a pure CSS  
approach instead. Is that the case? If so, that's fine. But please let  
me know so I don't waste my time trying to help when you don't really  
need it.


thanks,

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Apr 19, 2009, at 4:53 AM, moof wrote:



it's giving me a 503 error!

script: http://moof.be/jquery.cluetip.js:503

perhaps this helps...



On 19 apr, 05:17, Karl Swedberg  wrote:

Not sure exactly what is causing the problem, but you should upgrade
your version of jQuery to 1.3.2 and remove the reference to demo.js,
since that one isn't needed. I pulled down your page and made those
two changes, and it seemed to work fine from here.

--Karl


Karl Swedbergwww.englishrules.comwww.learningjquery.com

On Apr 18, 2009, at 5:42 PM, moof moof wrote:


Goodmorning



I installed wordpress on my website and now my cleutip stops
working. HLP!
Did I do anything wrong? I installed Lightbox 2 and All in One SEO
Pack in wordpress. Deactivated them but stil no cleutip.



My site is onwww.moof.beIt worked perfect before wordpress



Really need help...



thanxs




[jQuery] Re: how to detect if i have past an element

2009-04-19 Thread iceangel89

hmm, how can i detect "whatever is currently front & center"?

On Apr 19, 10:17 pm, brian  wrote:
> Make each section a div with an id. Rather than testing to see what
> element has been passed (named anchors are so 1998) you'd check to see
> which element contains whatever is currently front & center.
>
> On Sun, Apr 19, 2009 at 9:25 AM, iceangel89  wrote:
>
> > i am thinking of doing something like a long vertical scrolling
> > portfolio. i have a few categories that i want to use as the
> > navigation items. eg. web design, digital art etc.
>
> > so i need a way of detecting if i have past, say web design and into
> > digital art. but not yet into the next category say logo design. how
> > can i do this? i am thinking i will have anchors for the categories. i
> > want to use jQuery to detect whats the category thats visible to the
> > user. tho there maybe chance that more that 1 category is visible.


[jQuery] How to rewrite this in jQuery?

2009-04-19 Thread Simon

Hi all,

I have been trying to find a way to do this in jQuery but am a little
stuck.

Basically, due to a CMS we use, we can't enter IDs for any elements in
the HTML code, but we can add classes and say a rel tag. We are
wanting to build a tabbed layout using jQuery, but obviously this
would require elements with IDs for a straightforward solution.

How can I make jQuery read say this code:




and replace the 'rel' with 'id' ? Or is this asking too much?

Many thanks in advance,

Simon


[jQuery] Re: How to run cf regex (or regular regex) on this code?

2009-04-19 Thread Charlie Griefer

On Sun, Apr 19, 2009 at 3:58 PM, Rick Faircloth
 wrote:
> That worked, Ricardo...to a point.
> (Haven't tried your solution, Charlie...)
>
> I actually just embedded the replace function in the code like this:
>
> out.push('' + row[4].replace(/\r?\n/, '') +
> '');
>
> and that worked, but only for the first line break in the text.
>
> I tried adding 'all', like I do when I use the replace function in CFML,
> but it had no effect.
>
> ...'', 'all') + '');
>
> Suggestions?

Sure.  I suggest you return the data in the format that you need it to be in.

You've complained in the past that JS isn't like CF.  Here's a place
where you can play to your strengths and manipulate the string prior
to returning it from the remote CFC call.

-- 
I have failed as much as I have succeeded. But I love my life. I love
my wife. And I wish you my kind of success.


[jQuery] Re: fadeOut Callback Trigger Count

2009-04-19 Thread Karl Swedberg

You could do something like this:

$(document).ready(function() {
$("#menu ul li a").click(function(e) {
e.preventDefault();
var $sibs = $(this).parent().siblings();
$sibs.fadeOut(function() {
  if ( $sibs.index(this) == $sibs.length-1 ) {
$("p").append("Executed. ");
  }
});
});
$("p").append("Page loaded. ");
});

This will only append "Executed." for the last sibling in the group.  
($sibs.index(this) == $sibs.length-1).


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Apr 19, 2009, at 6:01 PM, blockedmind wrote:



Thanks for the reply firstly. :) Since I'm talking about a default
jQuery function I didn't give a full example. If you think that I'd
help let me give you one.

I have simplified my code for the example, here it goes:
http://blockedmind.com/jq/fadeout.html

When you click a link, the others are disappearing and a message is
added to the testing paragraf. I want to get "Executed" text added
once. But it is added as many as the count of siblings due to default
options of fadeOut callback function.

And no, I can not put it elsewhere because I have more effects after
click in my real situation and I need to get that message after all of
them completed and for once of course.

I hope I am clear?


On Apr 19, 4:44 pm, Karl Swedberg  wrote:

Would you mind giving us some code to look at? Or point us to a test
page? It might be easier to help you if we have something to look at.

--Karl


Karl Swedbergwww.englishrules.comwww.learningjquery.com

On Apr 19, 2009, at 7:22 AM, blockedmind wrote:




Hmmm...



On Apr 18, 2:28 am, blockedmind  wrote:

Nothing?



On Apr 17, 8:46 pm, blockedmind  wrote:



This problem occurs when $("#menu li a").fadeOut(function() {});
being
used. callback function is called 3 times 'cos there is 3 li
elements.



On Apr 17, 7:28 pm, blockedmind  wrote:



Callback function of fadeOut effect is executed once for each
element
animated against. Is it possible to make it executed once after  
all

elements faded?




[jQuery] Re: How to run cf regex (or regular regex) on this code?

2009-04-19 Thread Rick Faircloth
That worked, Ricardo...to a point.
(Haven't tried your solution, Charlie...)

I actually just embedded the replace function in the code like this:

out.push('' + row[4].replace(/\r?\n/, '') +
'');

and that worked, but only for the first line break in the text.

I tried adding 'all', like I do when I use the replace function in CFML,
but it had no effect.

...'', 'all') + '');

Suggestions?

Thanks,

Rick

On Sun, Apr 19, 2009 at 5:58 PM, Ricardo  wrote:

>
> Have you tried replacing the line breaks in javascript?
>
> var txt = row[4].replace(/\r?\n/, '');
> out.push('')
> out.push(txt);
> out.push('');
>
> On Apr 18, 10:12 pm, Rick Faircloth  wrote:
> > Normally, when I'm trying to cause a passage of text to respond to line
> > breaks, I use this ColdFusion code:
> >
> > #replace(myText, '#chr(13)#', '', 'all')#
> >
> > and that keeps the line breaks intact when the text is output to the
> screen.
> >
> > But how can I write that code inside this js?  Or do I have to do it
> outside
> > the js?
> > ("row[4]" represents the text)
> >
> > out.push('' + row[4] + '');
> >
> > out.push('#replace(' + row[4] + ',
> > '#chr(13)#', '', 'all')#');
> >
> > That wouldn't work anyway, since the HTML is being inserted into the DOM
> via
> > jQuery,
> > so the page isn't being refreshed to trigger the ColdFusion processing.
> >
> > The text, coming from an AJAX function is delivered to the display
> function
> > in
> > response.QGETSTORYINFO.DATA, and is delivered from a ColdFusion component
> > method
> > via storyStruct.QGETSTORYINFO, so, there's not a chance, that I can see
> to
> > run the
> > replace operation on the code in the method.
> >
> > Can I somehow run the replace on all the qGetStoryInfo.section_text data
> > after it's queried,
> > then "reinsert" it into the struct, storyStruct.QGETSTORYINFO ???
> >
> > Suggestions?
> >
> > Thanks,
> >
> > Rick
> >
> > --
> >
> -
> > "It has been my experience that most bad government is the result of too
> > much government." - Thomas Jefferson
>
>


-- 
-
"It has been my experience that most bad government is the result of too
much government." - Thomas Jefferson


[jQuery] Re: jQuery works fine locally but not so great online

2009-04-19 Thread Rick Faircloth
Also, I noticed that you don't have $(document).ready(function() {
surrounding the code.  I did get a firebug message that the DOM
wasn't ready when the code tried to run.

Try using $(document).ready(function() {  });  around the code
and see if it helps to get it to wait until the DOM is complete.

Rick

On Sun, Apr 19, 2009 at 5:41 PM, Jordon Bedwell wrote:

>  I did what Rick did, and tried to refresh, and the entire page
> disappeared and FF got WTF Pwnt.  I notice the main differences between how
> you do it and how the site who made the script does it is you do not conform
> to proper HTML and use  and you
> definably don't set a width in the CSS for IMG.  Try adjusting those two and
> let us know how it works out.
>
>
>
>
>
> *From:* jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] *On
> Behalf Of *Rick Faircloth
> *Sent:* Sunday, April 19, 2009 4:18 PM
> *To:* jquery-en@googlegroups.com
> *Subject:* [jQuery] Re: jQuery works fine locally but not so great online
>
>
>
> Oddly enough, when I first viewed the wedding photos, after the first one
> the others
>
> were tiny in the upper left-hand corner.
>
>
>
> After refreshing and re-veiwing, all looked well...
>
>
>
> Rick
>
> On Sun, Apr 19, 2009 at 4:08 PM, alexandruv  wrote:
>
>
>
> Ok, how about Firefox or Safari? On my computer they don't...
>
> Rick Faircloth wrote:
> >
> > The photos in the wedding section look fine in IE 8...
> >
> > Rick
> >
> > On Sun, Apr 19, 2009 at 1:18 AM, alexandruv  wrote:
> >
> >>
> >>
> >> Hello,
> >> I'm not very experienced with jQuery and I'm trying to use it on a
> >> website:
> >> www.fallinlovewithphotography.com
> >>
> >> On my computer (Mac OS X with MAMP) works fine but online the photos I'm
> >> trying to slide get resized.
> >>
> >> Can anybody tell me what i'm doing wrong or what can be the issue?
> >>
> >> Thank you,
> >> Alex
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/jQuery-works-fine-locally-but-not-so-great-online-tp23117127s27240p23117127.html
> >> Sent from the jQuery General Discussion mailing list archive at
> >> Nabble.com.
> >>
> >>
> >>
> >
> >
> > --
> >
> -
> > "It has been my experience that most bad government is the result of too
> > much government." - Thomas Jefferson
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/jQuery-works-fine-locally-but-not-so-great-online-tp23117127s27240p23126868.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>
>
>
> --
>
> -
> "It has been my experience that most bad government is the result of too
> much government." - Thomas Jefferson
>



-- 
-
"It has been my experience that most bad government is the result of too
much government." - Thomas Jefferson


[jQuery] Re: fadeOut Callback Trigger Count

2009-04-19 Thread mkmanning

You could keep a running count of how many li's have called fadeOut
and store it with .data(). Here's an example storing it on the parent
ul:

$("#menu ul li a").click(function(e) {
e.preventDefault();
var li = $(this).parent().siblings();
li.fadeOut(function() {
var licount = $(this).closest('ul');

licount.data('count',(licount.data('count')?(licount.data('count')
+1):1));
if(licount.data('count') == li.length){
$("p").append("Executed. ");
}
});
});

On Apr 19, 3:01 pm, blockedmind  wrote:
> Thanks for the reply firstly. :) Since I'm talking about a default
> jQuery function I didn't give a full example. If you think that I'd
> help let me give you one.
>
> I have simplified my code for the example, here it 
> goes:http://blockedmind.com/jq/fadeout.html
>
> When you click a link, the others are disappearing and a message is
> added to the testing paragraf. I want to get "Executed" text added
> once. But it is added as many as the count of siblings due to default
> options of fadeOut callback function.
>
> And no, I can not put it elsewhere because I have more effects after
> click in my real situation and I need to get that message after all of
> them completed and for once of course.
>
> I hope I am clear?
>
> On Apr 19, 4:44 pm, Karl Swedberg  wrote:
>
> > Would you mind giving us some code to look at? Or point us to a test  
> > page? It might be easier to help you if we have something to look at.
>
> > --Karl
>
> > 
> > Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> > On Apr 19, 2009, at 7:22 AM, blockedmind wrote:
>
> > > Hmmm...
>
> > > On Apr 18, 2:28 am, blockedmind  wrote:
> > >> Nothing?
>
> > >> On Apr 17, 8:46 pm, blockedmind  wrote:
>
> > >>> This problem occurs when $("#menu li a").fadeOut(function() {});  
> > >>> being
> > >>> used. callback function is called 3 times 'cos there is 3 li  
> > >>> elements.
>
> > >>> On Apr 17, 7:28 pm, blockedmind  wrote:
>
> >  Callback function of fadeOut effect is executed once for each  
> >  element
> >  animated against. Is it possible to make it executed once after all
> >  elements faded?


[jQuery] Re: on_mouse_over scrolling

2009-04-19 Thread Macsig

Hi Victor,
thanks for your reply.

now it works but there is still an issue with the code:

I can scroll down and up but after scrolling up it doesn't go down
anymore (and vice-versa if I scroll up and after down I can't go up
anymore).
I don't get any errors, simply it doesn't move.

Do you have any ideas about that?

Thanks and have a nice day!





On Apr 19, 5:33 am, victorg  wrote:
> Ah, it seems that jQuery 1.2.3 does not have that method..
>
> Elements still have a scrollTop property tho, so you could try that
> instead.
>
> Not tested, but i think it should work:http://pastebin.com/m5a3326a7
>
> On Apr 19, 2:06 am, Macsig  wrote:
>
> > Hi Victor and thanks for your reply.
>
> > I have wrapped up your code within a $(document).ready(function(){
> > but when I go over the button I get
>
> > $(el).scrollTop is not a function
> > [Break on this error]$(el).scrollTop(jQuery(el).scrollTop() + inc);
>
> > I'm using jQuery 1.2.3.
>
> > Am I missing something?
>
> > Thanks again and have a nice day.
>
> > On Apr 18, 4:00 am, victorg  wrote:
>
> > > I think you could easily accomplish that by defining an mouseover
> > > handler for your button that does a setInterval() to a function that
> > > scrolls your container.
>
> > > The scrolling of your container would be accomplished by fooling
> > > around with the scrollTop() function.
>
> > > I've put together a test script:http://pastebin.com/f40bb5800
>
> > > Where #scroller is the div with overflow.
>
> > > On Apr 18, 8:40 am, Macsig  wrote:
>
> > > > Any ideas?
>
> > > > Thanks and have a nice weekend
>
> > > > On Apr 16, 5:00 pm, macsig  wrote:
>
> > > > > Hi there,
> > > > > I'm trying to implement a simple scrolling system: basically I have a
> > > > > div with a specific height and auto overflow and I want to let the div
> > > > > content scrolling down when the mouse is over an icon. It has to scrol
> > > > > until the end of the content or until the muose is moved.
>
> > > > > But I cannot make it working so far.
>
> > > > > Any idea or even better a sample to solve my issue?
>
> > > > > Thanks fpr any help, I appreciate it.
>
> > > > > Sig


[jQuery] Re: on_mouse_over scrolling

2009-04-19 Thread Macsig

Works nicely

Thanks man for your help. I appreciated it.

Have a good 1!



Sig

On Apr 19, 5:33 am, victorg  wrote:
> Ah, it seems that jQuery 1.2.3 does not have that method..
>
> Elements still have a scrollTop property tho, so you could try that
> instead.
>
> Not tested, but i think it should work:http://pastebin.com/m5a3326a7
>
> On Apr 19, 2:06 am, Macsig  wrote:
>
> > Hi Victor and thanks for your reply.
>
> > I have wrapped up your code within a $(document).ready(function(){
> > but when I go over the button I get
>
> > $(el).scrollTop is not a function
> > [Break on this error]$(el).scrollTop(jQuery(el).scrollTop() + inc);
>
> > I'm using jQuery 1.2.3.
>
> > Am I missing something?
>
> > Thanks again and have a nice day.
>
> > On Apr 18, 4:00 am, victorg  wrote:
>
> > > I think you could easily accomplish that by defining an mouseover
> > > handler for your button that does a setInterval() to a function that
> > > scrolls your container.
>
> > > The scrolling of your container would be accomplished by fooling
> > > around with the scrollTop() function.
>
> > > I've put together a test script:http://pastebin.com/f40bb5800
>
> > > Where #scroller is the div with overflow.
>
> > > On Apr 18, 8:40 am, Macsig  wrote:
>
> > > > Any ideas?
>
> > > > Thanks and have a nice weekend
>
> > > > On Apr 16, 5:00 pm, macsig  wrote:
>
> > > > > Hi there,
> > > > > I'm trying to implement a simple scrolling system: basically I have a
> > > > > div with a specific height and auto overflow and I want to let the div
> > > > > content scrolling down when the mouse is over an icon. It has to scrol
> > > > > until the end of the content or until the muose is moved.
>
> > > > > But I cannot make it working so far.
>
> > > > > Any idea or even better a sample to solve my issue?
>
> > > > > Thanks fpr any help, I appreciate it.
>
> > > > > Sig


[jQuery] Re: this.appendChild(E) error

2009-04-19 Thread Bruce MacKay

Thanks Jordon - but alas this adjustment made no difference to IE.

Bruce


At 09:57 a.m. 20/04/2009, you wrote:

Try doing $("#editorbox").fadeIn(500).html(field.doeditor);

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] 
On Behalf Of Bruce MacKay

Sent: Sunday, April 19, 2009 4:16 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] this.appendChild(E) error

Hello folks,

I'm getting an IE-only error (IE6/7) on a page for which I cannot 
find a solution.  IE reports an error (Unexpected call to method or 
property access) at line 12.  The Script Debugger is pointing to 
"this.appendChild(E) " in jquery (v1.3.2 rev. 6246).


The context of the code is below - IE chokes at the line 
indicated.  I have loaded the json field 'doeditor' with nothing and 
with simple text and the error is still thrown, so I don't believe 
it is anything in the field per se that is causing the problem.


Any directions gratefully accepted.

Thanks,
Bruce

function showResponse(json) {
if (json.fields) {
$("#busy").hide();
for (var i = 0; i < json.fields.length; i++) {
var field = json.fields[i];
switch(field.zone) {
case "newtext":
switch(field.yesno) {
case "Y":
 $('#newfile,#sidebar,#selectlist,#archiveOff').hide();

$('#contentwrapper').css('background-image','url(images/blank.gif)');
-->   $("#editorbox").html(field.doeditor).fadeIn(500);
 $("#editor > ul").tabs({fxFade: true, fxSpeed: "fast",selected: 1});

$("a.showarchive").bind("click",function(){getArchive(this.id);return false});
 setTinyMCE('400px');
 var options = {dataType: 'json', beforeSubmit: 
showRequest,success: showResponse};
 $('#editor_form').submit(function() 
{tinyMCE.triggerSave();$(this).ajaxSubmit(options);return false;});

break;
case "N":

$("#addnewpage").animate({backgroundColor:'red'},2000).animate({backgroundColor:'#FFF'},1000);
 $("#xfback").html(field.msg);
}
break;
[snip]


[jQuery] Re: fadeOut Callback Trigger Count

2009-04-19 Thread blockedmind

Thanks for the reply firstly. :) Since I'm talking about a default
jQuery function I didn't give a full example. If you think that I'd
help let me give you one.

I have simplified my code for the example, here it goes:
http://blockedmind.com/jq/fadeout.html

When you click a link, the others are disappearing and a message is
added to the testing paragraf. I want to get "Executed" text added
once. But it is added as many as the count of siblings due to default
options of fadeOut callback function.

And no, I can not put it elsewhere because I have more effects after
click in my real situation and I need to get that message after all of
them completed and for once of course.

I hope I am clear?


On Apr 19, 4:44 pm, Karl Swedberg  wrote:
> Would you mind giving us some code to look at? Or point us to a test  
> page? It might be easier to help you if we have something to look at.
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Apr 19, 2009, at 7:22 AM, blockedmind wrote:
>
>
>
> > Hmmm...
>
> > On Apr 18, 2:28 am, blockedmind  wrote:
> >> Nothing?
>
> >> On Apr 17, 8:46 pm, blockedmind  wrote:
>
> >>> This problem occurs when $("#menu li a").fadeOut(function() {});  
> >>> being
> >>> used. callback function is called 3 times 'cos there is 3 li  
> >>> elements.
>
> >>> On Apr 17, 7:28 pm, blockedmind  wrote:
>
>  Callback function of fadeOut effect is executed once for each  
>  element
>  animated against. Is it possible to make it executed once after all
>  elements faded?


[jQuery] Re: Communicating Info from Server to Javascript, Prior to Ajax Calls?

2009-04-19 Thread Jordon Bedwell

If you use PHP then it's better to have it output the userID as a variable
already inside of JavaScript to save the extra code, or to set it as a
cookie, as a matter of fact, if you use Expression Engine, WP or most any
other major CMS, there is a cookie already set with that info so you can
just pull it from there.

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Vik
Sent: Sunday, April 19, 2009 3:40 PM
To: jQuery (English)
Subject: [jQuery] Communicating Info from Server to Javascript, Prior to
Ajax Calls?


Let's say I want my javascript to know some info, e.g. the username of
the user, and I'd like to communicate it prior to any Ajax calls. So
far I've been storing the info in a hidden field that jQuery can
access via an id.  Is this the correct approach?

Thanks in advance to all for any info.



[jQuery] Re: How to run cf regex (or regular regex) on this code?

2009-04-19 Thread Ricardo

Have you tried replacing the line breaks in javascript?

var txt = row[4].replace(/\r?\n/, '');
out.push('')
out.push(txt);
out.push('');

On Apr 18, 10:12 pm, Rick Faircloth  wrote:
> Normally, when I'm trying to cause a passage of text to respond to line
> breaks, I use this ColdFusion code:
>
> #replace(myText, '#chr(13)#', '', 'all')#
>
> and that keeps the line breaks intact when the text is output to the screen.
>
> But how can I write that code inside this js?  Or do I have to do it outside
> the js?
> ("row[4]" represents the text)
>
> out.push('' + row[4] + '');
>
> out.push('#replace(' + row[4] + ',
> '#chr(13)#', '', 'all')#');
>
> That wouldn't work anyway, since the HTML is being inserted into the DOM via
> jQuery,
> so the page isn't being refreshed to trigger the ColdFusion processing.
>
> The text, coming from an AJAX function is delivered to the display function
> in
> response.QGETSTORYINFO.DATA, and is delivered from a ColdFusion component
> method
> via storyStruct.QGETSTORYINFO, so, there's not a chance, that I can see to
> run the
> replace operation on the code in the method.
>
> Can I somehow run the replace on all the qGetStoryInfo.section_text data
> after it's queried,
> then "reinsert" it into the struct, storyStruct.QGETSTORYINFO ???
>
> Suggestions?
>
> Thanks,
>
> Rick
>
> --
> -
> "It has been my experience that most bad government is the result of too
> much government." - Thomas Jefferson


[jQuery] Re: this.appendChild(E) error

2009-04-19 Thread Jordon Bedwell
Try doing $("#editorbox").fadeIn(500).html(field.doeditor);

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Bruce MacKay
Sent: Sunday, April 19, 2009 4:16 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] this.appendChild(E) error

 

Hello folks,

I'm getting an IE-only error (IE6/7) on a page for which I cannot find a
solution.  IE reports an error (Unexpected call to method or property
access) at line 12.  The Script Debugger is pointing to "this.appendChild(E)
" in jquery (v1.3.2 rev. 6246).

The context of the code is below - IE chokes at the line indicated.  I have
loaded the json field 'doeditor' with nothing and with simple text and the
error is still thrown, so I don't believe it is anything in the field per se
that is causing the problem.

Any directions gratefully accepted.

Thanks,
Bruce

function showResponse(json) {
if (json.fields) {
$("#busy").hide();
for (var i = 0; i < json.fields.length; i++) {
var field = json.fields[i]; 
switch(field.zone) {
case "newtext":
switch(field.yesno) {
case "Y":
 $('#newfile,#sidebar,#selectlist,#archiveOff').hide();
 
$('#contentwrapper').css('background-image','url(images/blank.gif)');
-->   $("#editorbox").html(field.doeditor).fadeIn(500); 
 $("#editor > ul").tabs({fxFade: true, fxSpeed: "fast",selected:
1});
 
$("a.showarchive").bind("click",function(){getArchive(this.id);return
false});
 setTinyMCE('400px');
 var options = {dataType: 'json', beforeSubmit: showRequest,success:
showResponse}; 
 $('#editor_form').submit(function()
{tinyMCE.triggerSave();$(this).ajaxSubmit(options);return false;});   
break;
case "N":
 
$("#addnewpage").animate({backgroundColor:'red'},2000).animate({backgroundCo
lor:'#FFF'},1000);
 $("#xfback").html(field.msg);
}
break;
[snip]



[jQuery] Re: jQuery works fine locally but not so great online

2009-04-19 Thread Jordon Bedwell
I did what Rick did, and tried to refresh, and the entire page disappeared
and FF got WTF Pwnt.  I notice the main differences between how you do it
and how the site who made the script does it is you do not conform to proper
HTML and use  and you definably don't
set a width in the CSS for IMG.  Try adjusting those two and let us know how
it works out. 

 

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Rick Faircloth
Sent: Sunday, April 19, 2009 4:18 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery works fine locally but not so great online

 

Oddly enough, when I first viewed the wedding photos, after the first one
the others

were tiny in the upper left-hand corner.

 

After refreshing and re-veiwing, all looked well...

 

Rick

On Sun, Apr 19, 2009 at 4:08 PM, alexandruv  wrote:



Ok, how about Firefox or Safari? On my computer they don't...

Rick Faircloth wrote:
>
> The photos in the wedding section look fine in IE 8...
>
> Rick
>
> On Sun, Apr 19, 2009 at 1:18 AM, alexandruv  wrote:
>
>>
>>
>> Hello,
>> I'm not very experienced with jQuery and I'm trying to use it on a
>> website:
>> www.fallinlovewithphotography.com
 
>>
>> On my computer (Mac OS X with MAMP) works fine but online the photos I'm
>> trying to slide get resized.
>>
>> Can anybody tell me what i'm doing wrong or what can be the issue?
>>
>> Thank you,
>> Alex
>> --
>> View this message in context:
>>
http://www.nabble.com/jQuery-works-fine-locally-but-not-so-great-online-tp23
117127s27240p23117127.html
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
>>
>>
>>
>
>
> --
>


-
> "It has been my experience that most bad government is the result of too
> much government." - Thomas Jefferson
>
>

--
View this message in context:
http://www.nabble.com/jQuery-works-fine-locally-but-not-so-great-online-tp23
117127s27240p23126868.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.






-- 


-
"It has been my experience that most bad government is the result of too
much government." - Thomas Jefferson



[jQuery] Re: jQuery works fine locally but not so great online

2009-04-19 Thread Rick Faircloth
Oddly enough, when I first viewed the wedding photos, after the first one
the others
were tiny in the upper left-hand corner.

After refreshing and re-veiwing, all looked well...

Rick

On Sun, Apr 19, 2009 at 4:08 PM, alexandruv  wrote:

>
>
> Ok, how about Firefox or Safari? On my computer they don't...
>
> Rick Faircloth wrote:
> >
> > The photos in the wedding section look fine in IE 8...
> >
> > Rick
> >
> > On Sun, Apr 19, 2009 at 1:18 AM, alexandruv  wrote:
> >
> >>
> >>
> >> Hello,
> >> I'm not very experienced with jQuery and I'm trying to use it on a
> >> website:
> >> www.fallinlovewithphotography.com
> >>
> >> On my computer (Mac OS X with MAMP) works fine but online the photos I'm
> >> trying to slide get resized.
> >>
> >> Can anybody tell me what i'm doing wrong or what can be the issue?
> >>
> >> Thank you,
> >> Alex
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/jQuery-works-fine-locally-but-not-so-great-online-tp23117127s27240p23117127.html
> >> Sent from the jQuery General Discussion mailing list archive at
> >> Nabble.com.
> >>
> >>
> >>
> >
> >
> > --
> >
> -
> > "It has been my experience that most bad government is the result of too
> > much government." - Thomas Jefferson
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/jQuery-works-fine-locally-but-not-so-great-online-tp23117127s27240p23126868.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>
>


-- 
-
"It has been my experience that most bad government is the result of too
much government." - Thomas Jefferson


[jQuery] this.appendChild(E) error

2009-04-19 Thread Bruce MacKay

Hello folks,

I'm getting an IE-only error (IE6/7) on a page for which I cannot 
find a solution.  IE reports an error (Unexpected call to method or 
property access) at line 12.  The Script Debugger is pointing to 
"this.appendChild(E) " in jquery (v1.3.2 rev. 6246).


The context of the code is below - IE chokes at the line 
indicated.  I have loaded the json field 'doeditor' with nothing and 
with simple text and the error is still thrown, so I don't believe it 
is anything in the field per se that is causing the problem.


Any directions gratefully accepted.

Thanks,
Bruce

function showResponse(json) {
if (json.fields) {
$("#busy").hide();
for (var i = 0; i < json.fields.length; i++) {
var field = json.fields[i];
switch(field.zone) {
case "newtext":
switch(field.yesno) {
case "Y":
 $('#newfile,#sidebar,#selectlist,#archiveOff').hide();
 $('#contentwrapper').css('background-image','url(images/blank.gif)');
-->   $("#editorbox").html(field.doeditor).fadeIn(500);
 $("#editor > ul").tabs({fxFade: true, fxSpeed: "fast",selected: 1});
 $("a.showarchive").bind("click",function(){getArchive(this.id);return 
false});

 setTinyMCE('400px');
 var options = {dataType: 'json', beforeSubmit: 
showRequest,success: showResponse};
 $('#editor_form').submit(function() 
{tinyMCE.triggerSave();$(this).ajaxSubmit(options);return false;});

break;
case "N":

$("#addnewpage").animate({backgroundColor:'red'},2000).animate({backgroundColor:'#FFF'},1000);
$("#xfback").html(field.msg);
}
break;
[snip]


[jQuery] Re: add href to table row from link inside row

2009-04-19 Thread kevind

never mind - added line :
window.location=href;

to complete process

thanks again

On Apr 19, 4:35 pm, kevind  wrote:
> hi,
>
> your example code didn't work - is there some step i'm missing ?
>
> here's an example of one of the rows in my table
>
> 
>   
>     USB Backupsetup USB
> backup
>   
>   09-Sep-08 
>   0809007 
> 


[jQuery] Communicating Info from Server to Javascript, Prior to Ajax Calls?

2009-04-19 Thread Vik

Let's say I want my javascript to know some info, e.g. the username of
the user, and I'd like to communicate it prior to any Ajax calls. So
far I've been storing the info in a hidden field that jQuery can
access via an id.  Is this the correct approach?

Thanks in advance to all for any info.


[jQuery] Re: add href to table row from link inside row

2009-04-19 Thread kevind

hi,

your example code didn't work - is there some step i'm missing ?

here's an example of one of the rows in my table


  
USB Backupsetup USB
backup
  
  09-Sep-08 
  0809007 




[jQuery] jquery works on evrything but mac->firefox ...?

2009-04-19 Thread Mathew

I am having problems with my jquery under firefox on mac os.
i have read some thing about unused js with mac and ie but i dont see
what is wrong.
one of my problems is a search component i made that submits and loads
with jquery ajax. it works fine with eveyrthing but on mac os the
results fall to the bottom of the page, the url is here:
http://undergroundinnertainment.com/2009/index.php?option=com_usersearch&Itemid=75

another problem i am having under mac os is where i am rebuilding
links on a page to rewrite them for a web based torrent client. the
orginal links are a link to the file and i am prepending and appending
the rst of the url to go to bitlet and load a web based torrent
client. again it works fine with everything but mac os and ff under
mac os. the link is here
http://undergroundinnertainment.com/2009/index.php?option=com_content&view=category&layout=blog&id=35&Itemid=80

i am stuck and trying to get a mac os applicance to check it out myself
(as these problems are reported to me, i dont have mac os)
but was wondering if nayone could see anything obvious that i am
missing.
any comments or criticism is appreciated, thanks


[jQuery] Re: jQuery works fine locally but not so great online

2009-04-19 Thread alexandruv


Ok, how about Firefox or Safari? On my computer they don't...

Rick Faircloth wrote:
> 
> The photos in the wedding section look fine in IE 8...
> 
> Rick
> 
> On Sun, Apr 19, 2009 at 1:18 AM, alexandruv  wrote:
> 
>>
>>
>> Hello,
>> I'm not very experienced with jQuery and I'm trying to use it on a
>> website:
>> www.fallinlovewithphotography.com
>>
>> On my computer (Mac OS X with MAMP) works fine but online the photos I'm
>> trying to slide get resized.
>>
>> Can anybody tell me what i'm doing wrong or what can be the issue?
>>
>> Thank you,
>> Alex
>> --
>> View this message in context:
>> http://www.nabble.com/jQuery-works-fine-locally-but-not-so-great-online-tp23117127s27240p23117127.html
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
>>
>>
>>
> 
> 
> -- 
> -
> "It has been my experience that most bad government is the result of too
> much government." - Thomas Jefferson
> 
> 

-- 
View this message in context: 
http://www.nabble.com/jQuery-works-fine-locally-but-not-so-great-online-tp23117127s27240p23126868.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: add href to table row from link inside row

2009-04-19 Thread kevind

thanks - will try this - i meant grabbing the A link href and creating
an on-click event for the row - didn't look back at another page where
i built the onclick for the row by a different method

this will definitely save me time :)

On Apr 19, 3:45 pm, mkmanning  wrote:
> Just to clarify, your row can't have an href  as that's not a valid
> attribute, but you can put a click handler on the row and have it
> access the contained anchor to get the href. This might get you
> started:
>
> $('tr.row').click(function(){
>   var href = $(this).find('a').attr('href');
>
> })
>
> Be aware that depending upon how your markup is structured, a user
> could click the anchor itself and that would be followed, so you might
> want to return false if that's not desirable behavior.
>
> On Apr 19, 12:35 pm, kevind  wrote:
>
> > I want to make rows in a table clickable.  the row already contains a
> > link in a TD cell which works - however, i've added a hover effect to
> > the table and want to copy the href from the link and add it to the
> > row itself
>
> > all rows in the table have class  .Row  to make selection through
> > JQuery easier.
>
> > I can add href fairly easily to the rows, but i don't understand how
> > to scan the row for a link (there is only one) and copy it to the
> > row's href.
>
> > HELP


[jQuery] Re: add href to table row from link inside row

2009-04-19 Thread mkmanning

Just to clarify, your row can't have an href  as that's not a valid
attribute, but you can put a click handler on the row and have it
access the contained anchor to get the href. This might get you
started:

$('tr.row').click(function(){
  var href = $(this).find('a').attr('href');
})

Be aware that depending upon how your markup is structured, a user
could click the anchor itself and that would be followed, so you might
want to return false if that's not desirable behavior.

On Apr 19, 12:35 pm, kevind  wrote:
> I want to make rows in a table clickable.  the row already contains a
> link in a TD cell which works - however, i've added a hover effect to
> the table and want to copy the href from the link and add it to the
> row itself
>
> all rows in the table have class  .Row  to make selection through
> JQuery easier.
>
> I can add href fairly easily to the rows, but i don't understand how
> to scan the row for a link (there is only one) and copy it to the
> row's href.
>
> HELP


[jQuery] add href to table row from link inside row

2009-04-19 Thread kevind

I want to make rows in a table clickable.  the row already contains a
link in a TD cell which works - however, i've added a hover effect to
the table and want to copy the href from the link and add it to the
row itself

all rows in the table have class  .Row  to make selection through
JQuery easier.

I can add href fairly easily to the rows, but i don't understand how
to scan the row for a link (there is only one) and copy it to the
row's href.

HELP


[jQuery] Re: Selecting menu items by value

2009-04-19 Thread mkmanning

The jQuery object is array-like. To see how many results it contains,
just use .length

On Apr 19, 11:44 am, ajc  wrote:
> I tried that, but it didn't work for me. I'm new to jQuery, so maybe
> I'm doing something silly, but here's what I had:
>
>         alert($('select[value="ext"]').size());
>
> This shows 0, when there is one menu with "ext" as the value. If I
> remove the value expression and just use 'select', I get 9 as the
> output, which is correct as there are nine menus on the page.
>
> Any ideas?
>
> Thanks,
> Anthony
>
> On Apr 19, 10:40 am, mkmanning  wrote:
>
> > $('select[value=yes]') should return all of the select menus with
> > 'yes' as the chosen option.
>
> > On Apr 19, 2:42 am, ajc  wrote:
>
> > > I am trying to figure out how to select all the menu items that have a
> > > particular value in a form. For example, let's say you had a form with
> > > 10 different yes/no menus, and you wanted to select all of the ones
> > > that are currently set to "yes". Is there a way to do that? I tried
> > > doing something like:
>
> > > $("option[value='yes'][selected='true'])
>
> > > That seemed to always return zero results. If I leave out the
> > > 'selected' attribute in the expression, it returns the correct number
> > > of elements (10 in this example). But that is the total number of
> > > menus with a 'yes' option, whether or not they are selected.
>
> > > Any ideas on how I can do this?
>
> > > Thanks,
> > > Anthony


[jQuery] Re: Questions about $.live, Live Query and performance

2009-04-19 Thread Josh Powell

Geoff - Selectors do make some difference, they always do, but the way
I've heard that .live() works is to add an event handler on the
document root and when events bubble up to it, doing some javascript
mojo to detect what element that event happened on and seeing if it
matches the selector.  .live('click') events do not have a major
impact on performance and can even speed things up as you do not need
to bind a click event on every dynamically created link.  .live
('mouseover') and the like, however, would get executed far more often
and can easily degrade performance, so be careful with these.

On Apr 19, 9:16 am, Geoffrey  wrote:
> $.live and Live Query are both wonderful. I am hoping to put them to
> extensive use in my projects.
>
> I have a few questions about $.live and Live Query and their effect on
> performance.
>
> Background: If I recall correctly, the original release of Live Query
> could have some performance problems. I don't remember if things
> bogged down when the DOM had a lot of elements, when you added a large
> number of Live Query events, did a lot of updating or exactly what.
>
> Question 1:
> What were the specific concerns around performance with the 1.0.x
> releases of Live Query?
>
> Now with jquey 1.3, there is $.live. $.live does not do everything
> that Live Query does, but does do some of it.
>
> Question 2:
> Does $.live use a different technique for handling events than Live
> Query?
>
> Question 2a:
> If it is different, are there any performance concerns using $.live
> like there used to be with Live Query?
>
> Live Query 1.1.x requires jquery 1.3. I am guessing that the new
> version uses $.live internally.
>
> Question 3a:
> Is the performance of Live Query better in the 1.1.x version?
>
> Question 3b:
> Are there some selectors that have better performance than others? or
> to say it another way, do all of the selectors perform the same or,
> for example, does
> $('input').livequery('click', function() { });
> perform better than
> $('input').livequery('change', function() { });?
>
> Using $.live or Live Query.
> Question 4:
> Is there any difference in performce between using
> $('input').livequery('click', function() { });
> vs
> $("input").live("click", function(){ });?
>
> I am thinking of really diving in to using $.live and/or Live Query. I
> am trying to get a complete understanding of all of the issues that
> may arise.
>
> Thanks
> -Geoff


[jQuery] Re: Selecting menu items by value

2009-04-19 Thread ajc

I tried that, but it didn't work for me. I'm new to jQuery, so maybe
I'm doing something silly, but here's what I had:

alert($('select[value="ext"]').size());

This shows 0, when there is one menu with "ext" as the value. If I
remove the value expression and just use 'select', I get 9 as the
output, which is correct as there are nine menus on the page.

Any ideas?

Thanks,
Anthony

On Apr 19, 10:40 am, mkmanning  wrote:
> $('select[value=yes]') should return all of the select menus with
> 'yes' as the chosen option.
>
> On Apr 19, 2:42 am, ajc  wrote:
>
> > I am trying to figure out how to select all the menu items that have a
> > particular value in a form. For example, let's say you had a form with
> > 10 different yes/no menus, and you wanted to select all of the ones
> > that are currently set to "yes". Is there a way to do that? I tried
> > doing something like:
>
> > $("option[value='yes'][selected='true'])
>
> > That seemed to always return zero results. If I leave out the
> > 'selected' attribute in the expression, it returns the correct number
> > of elements (10 in this example). But that is the total number of
> > menus with a 'yes' option, whether or not they are selected.
>
> > Any ideas on how I can do this?
>
> > Thanks,
> > Anthony


[jQuery] Re: maskedinput and $;ajax

2009-04-19 Thread Rick Faircloth
Have you looked into the "livequery" function for earlier versions of jQuery
or the .live function for the latest jQuery?

Rick

On Sat, Apr 18, 2009 at 6:02 PM, khin  wrote:

>
> Hi all,
>
> (I dont know if the last mensage was correctly sent)
>
> I trying aply masks in one form, the mask stay in the same page of the
> form. This form is loaded by $.ajax function. If I understand
> correctly, the mask need be declared on document.ready state. So, my
> form does not work.
>
> how can I solve this?
>
> Thx a lot!!
>
>


-- 
-
"It has been my experience that most bad government is the result of too
much government." - Thomas Jefferson


[jQuery] Re: jQuery works fine locally but not so great online

2009-04-19 Thread Rick Faircloth
The photos in the wedding section look fine in IE 8...

Rick

On Sun, Apr 19, 2009 at 1:18 AM, alexandruv  wrote:

>
>
> Hello,
> I'm not very experienced with jQuery and I'm trying to use it on a website:
> www.fallinlovewithphotography.com
>
> On my computer (Mac OS X with MAMP) works fine but online the photos I'm
> trying to slide get resized.
>
> Can anybody tell me what i'm doing wrong or what can be the issue?
>
> Thank you,
> Alex
> --
> View this message in context:
> http://www.nabble.com/jQuery-works-fine-locally-but-not-so-great-online-tp23117127s27240p23117127.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>
>


-- 
-
"It has been my experience that most bad government is the result of too
much government." - Thomas Jefferson


[jQuery] Re: clueTip access to xhr

2009-04-19 Thread Karl Swedberg
Since the plugin uses $.ajax(ajaxSettings) internally to retrieve the  
file contents, you can pass any options you want into the ajaxSettings  
option and they'll be used. So you should be able to do something like  
this:


$('someelement').cluetip({
  ajaxSettings: {
xhr: function() { }
  }
});

See http://docs.jquery.com/Ajax/jQuery.ajax#options for a list of  
$.ajax options. Also, make sure you use jQuery 1.3 or above and the  
latest clueTip version on Github ( http://github.com/kswedberg/jquery-cluetip/tree/master 
 )



--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Apr 16, 2009, at 2:52 PM, zendog74 wrote:



I am successfully using clueTip to make ajax requests that return
either xml or json and populate the tooltips. It is working great.
However, I am trying to make my code more sophisticated to handle
exceptions and I need access to the xhr to do that properly. I have
been unable to find a way to get access to the xhr using clueTip,
especially in the ajaxProcess function. Is there a way to do this?

Here is what I am trying to do:

ajaxProcess: function(xhr, data) {
   return checkResponse(xhr.status, data);
   }

//Pseudo-code
function checkHttpStatusCode(statusCode, data){
 //Check the status code and send back the error message in the
returned xml packet if there is one.

}




[jQuery] Re: Selecting menu items by value

2009-04-19 Thread mkmanning

$('select[value=yes]') should return all of the select menus with
'yes' as the chosen option.

On Apr 19, 2:42 am, ajc  wrote:
> I am trying to figure out how to select all the menu items that have a
> particular value in a form. For example, let's say you had a form with
> 10 different yes/no menus, and you wanted to select all of the ones
> that are currently set to "yes". Is there a way to do that? I tried
> doing something like:
>
> $("option[value='yes'][selected='true'])
>
> That seemed to always return zero results. If I leave out the
> 'selected' attribute in the expression, it returns the correct number
> of elements (10 in this example). But that is the total number of
> menus with a 'yes' option, whether or not they are selected.
>
> Any ideas on how I can do this?
>
> Thanks,
> Anthony


[jQuery] Re: Append before closing tag

2009-04-19 Thread MauiMan2

Thanks.


[jQuery] Re: Only one

2009-04-19 Thread Patrik

Ok thanks.

On 19 Apr, 17:37, "Jordon Bedwell"  wrote:
> That's why most people edit plugins because most plugin authors are very
> obtrusive and don't understand that sometimes we would like to include the
> libraries ourselves.  The best way to do so is to build a plugin called
> "JQuery" and buffer the entire page and search for the  tag that
> might include JQuery.  It's best you do that anyways because it's sloppy to
> put JQuery and any Javascript in the header like most plugins like to do and
> you can move it to the bottom.
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> Behalf Of Patrik
> Sent: Sunday, April 19, 2009 10:02 AM
> To: jQuery (English)
> Subject: [jQuery] Only one