[jQuery] Re: tutorial code doesn't work :-(

2007-12-12 Thread John Resig

Not sure exactly - did you remember to put it in a
$(document).ready(function(){ ... }) block?

--John

On Dec 12, 2007 3:31 AM, priti <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> I am relatively new in jquery.I just installed and was sailing thru
> tutorial.But somehow i was not able to run following code
> $("a")
>.filter(".clickme")
>  .click(function(){
>alert("You are now leaving the site.");
>  })
>.end()
>.filter(".hideme")
>  .click(function(){
>  alert('hide');
>$(this).hide();
>return false;
>  })
>.end();
>
>
> 
> html
>  http://google.com/"; class="clickme">I give a message when
> you leave
>  http://yahoo.com/"; class="hideme">Click me to hide!
>  http://microsoft.com/";>I'm a normal link
>
> i installed the latest version.
>
> Can someone explain where i might be missing.
>
> Regards,
> Priti
>


[jQuery] Re: Jaiku's jQuery plugs (http://jaiku.com/js/core.js)

2007-12-12 Thread John Resig

Good find - some real interesting code in there.

--John

On Dec 13, 2007 1:18 AM, R. Rajesh Jeba Anbiah
<[EMAIL PROTECTED]> wrote:
>
> (I'm posting this as Google returns no result 
> http://groups.google.com/groups?q=jquery+jaiku
> )
>
> FWIW, recently I've seen Jaiku's jQuery codes/plugins; they're quite
> elegant http://jaiku.com/js/core.js
>
> --
>   
> Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/
>


[jQuery] Jaiku's jQuery plugs (http://jaiku.com/js/core.js)

2007-12-12 Thread R. Rajesh Jeba Anbiah

(I'm posting this as Google returns no result 
http://groups.google.com/groups?q=jquery+jaiku
)

FWIW, recently I've seen Jaiku's jQuery codes/plugins; they're quite
elegant http://jaiku.com/js/core.js

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/


[jQuery] Re: ui.datepicker causes IE "operation aborted"

2007-12-12 Thread R. Rajesh Jeba Anbiah

On Dec 12, 7:56 pm, "KidsKilla .grin! wuz here" <[EMAIL PROTECTED]>
wrote:
> This problem caused in IE not because of jQuery bug, but because of IE bug.
> IE doesn't allow to work with DOM untill it's fully downloaded and be ready.
> This is why everything works fine inside $(document).ready()
> there is 2 ways to fix it:
> 1. initialize everything in $(document).ready()
> 2. paste your script tags in head or directly in body tag. (i mean
> there have to be no parent tags)
   

   This is not quite true. The ready() is keep on changing; I'm not
sure if one in svn is finalized.

   You'll get this error even if you follow the above 2 criteria in at
least one of the previous/current jQuery versions--especially if you
use jQuery from IFRAME.

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/


[jQuery] Re: Adding rounded corners to inline images? (not background)

2007-12-12 Thread R. Rajesh Jeba Anbiah

On Dec 13, 5:38 am, Action <[EMAIL PROTECTED]> wrote:
> I got the information about the image (height, width, src), removed
> it, then created a div of those dimensions in its place with that
> image set as the background.
   

   Thanks for sharing.

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/


[jQuery] Re: Creating an empty jQuery collection

2007-12-12 Thread Aaron Heimlich
var emptyJQueryCollection = jQuery([]);

On Dec 12, 2007 7:32 PM, McLars <[EMAIL PROTECTED]> wrote:

>
> Is there an elegant way to create an empty jQuery collection? The only
> way I've figured out to do it is like this:
>
> var jqObjects = $(this).not(this);
>
> This seems rather stupid to me. There should be a simpler way.
>
> I need this so that I can fill it with jQuery objects that I create
> inside a loop, and then I return the entire collection.
>
> Thanks,
>
> Larry
>



-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] Re: LavaLamp for jQuery 1.2.x?

2007-12-12 Thread Richard Shank
Hey Andy, I just looked on that page and near the bottom on the comments, I
found this


This plugin is currently incompatible with jQuery 1.2.x. To make it
compatible, replace .each(function() { $.dequeue(this, "fx"); }) with .stop()
around line 84-85.

I haven't tried it, let us know if it works.


On Dec 12, 2007 11:21 PM, Andy Matthews <[EMAIL PROTECTED]> wrote:

>
> I'm really wanting to use Ganeshki's excellent LavaLamp plugin (http://
> www.gmarwaha.com/blog/?p=7) but it appears that it doesn't work with
> the most current stable release of jQuery.
>
> Does anyone know if there's an updated release somewhere that meets
> the 1.2.x requirement? Or is there an alternate menu which gives the
> same effect?
>


[jQuery] Creating an empty jQuery collection

2007-12-12 Thread McLars

Is there an elegant way to create an empty jQuery collection? The only
way I've figured out to do it is like this:

var jqObjects = $(this).not(this);

This seems rather stupid to me. There should be a simpler way.

I need this so that I can fill it with jQuery objects that I create
inside a loop, and then I return the entire collection.

Thanks,

Larry


[jQuery] this:contains selector

2007-12-12 Thread Van

The contains selector works fine with tags (a:contains()) etc. but
doesn't seem to work with $(this).  What is the best way to use
contains with "this"??

here is my scenario:
var matchingText = "Text2";


Text1
Text2


I want to see if the text in matchingText matches text in any of the
anchor tags.  My goal is to add a class to the anchor tag that has
matching text and would like to use the ul.list selector to run
through each of the n amount of anchor tags (descendants of ul class
"list")

I've tried selecting them in-line, or with a .each() loop and each
time I cant seem to match using jQuery syntax...

Thanks for the help.


[jQuery] using :contains() selector with $(this)

2007-12-12 Thread Van

Hello,

I have a question about using the :contains filter to match the text
of an anchor tag...


Text 1
Text 2
...


I'm trying to use the ul.list selector to run through all anchor tag
descendants and check their .text() to see if it matches a query.

$(this:contains()) does not work, and I tried looping through the
children of ul.list li with an .each and I couldnt quite figure it
out.  If anyone can help I would appreciate it.  Hopefully this isnt a
duplicate - i posted this same thing this afternoon but it didnt go
through correctly.

Thank you


[jQuery] pushStack documentation

2007-12-12 Thread [EMAIL PROTECTED]

A few of the recent posts have mentioned using jQuery.pushStack to
turn an array into a jQuery object and allow the use of end(). Is
there any official documentation for it? I can figure out how to use
it from the source code, but to me if it's not documented then it's
not supported and may disappear in future releases. I hate to take
that chance. Can one of the jQuery team tell me if it's part of the
official jQuery interface and if so, add it to the Internals
documentation?

Danny


[jQuery] Re: Adding rounded corners to inline images? (not background)

2007-12-12 Thread Action

I got the information about the image (height, width, src), removed
it, then created a div of those dimensions in its place with that
image set as the background.

On Dec 12, 12:44 am, "R. Rajesh Jeba Anbiah"
<[EMAIL PROTECTED]> wrote:
> On Dec 11, 11:41 pm, Action <[EMAIL PROTECTED]> wrote:
>
> > Solved.
>
>Would you mind to share, how?
>
> --
>   
> Email: rrjanbiah-at-Y!comBlog:http://rajeshanbiah.blogspot.com/


[jQuery] cf ajax example

2007-12-12 Thread interarnett

I have created a simple app screen based off of the example/tutorial
on jquery website for coldfusion and ajax.

I have firebug running and have stepped through the entire process.
All processes seem to be working correclty, I fill a value in a
formfield and onblur a query is invoked and dataset is returned.
(Which i can see in console in firebug...)

I am just unable to get the values to display back on my screen in the
section defined via style sheet.

There is a parameter for success in ajax call.
Success never happens it only comes back and says that there is an
error but do not know how to trap for error...

Any help will be greatly appreciated

here is javascript
//
//$(document).ready(function(){
//  $("#idm").blur( function() {
//  var formval = { idm:$(this) .val()};
//  $.ajax({
//type: "POST",
//url: "req_processor_employee.cfm",
//dataType: "json",
//data: formval,
//success: function(response){
//  $
('#contentdiv').empty().fadeIn(2000).append(response.rname);
}
});
});

  });
//

sytle sheet

body {font-family: Arial, Helvetica, sans-serif;}
  #databox { border: 1px solid Gray;
 margin:30px auto 0px auto;
 padding: 10px;
 width: 200px;}
#contentdiv { color:red; font-size: 30px;  margin-top: 10px;}


form field



  






[jQuery] Re: dimensions plugin error

2007-12-12 Thread Matt W.

This error happens when trying to use a dimensions method on a jquery
selection that did not find anything (an empty jQuery collection).  If
you download the latest dimensions file from svn the error should no
longer happen.

On Dec 12, 10:40 am, Eridius <[EMAIL PROTECTED]> wrote:
> I am getting this follow error and not sure what it means
>
> [Exception... "'Dimensions: jQuery collection is empty' when calling method:
> [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
> (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]
> --
> View this message in 
> context:http://www.nabble.com/dimensions-plugin-error-tp14301281s27240p143012...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: intent of $('selector').title() call

2007-12-12 Thread howardk

Of course! Raise right hand and hit sharply upside the head. :-)

Thanks John

On Dec 12, 10:33 am, howardk <[EMAIL PROTECTED]> wrote:
> John's got an example of chaining in his book, "Pro JavaScript
> Techniques", that isn't working for me. More importantly, I don't
> understand what the code is intending to do, so I can make an attempt
> to fix it. The code in general is adding a help cursor and a red star
> to a field in a form to indicate that the field is required. The chain
> looks something like this:
>
> $('input.required')
>  .prev('label')
>  .css('cursor','help')
>  .title(errMsg.required)
>  .append('*');
>
> I've substituted my own explicit error message for errMsg.required,
> but javascript complains that .title( "..." ) is not a function. It's
> not in the current API. What is the intent of this call?
>
> Howard


[jQuery] Re: Returning a new collection from a method

2007-12-12 Thread McLars

I could not get the first example to work. Again, I just can't seem to
grasp what map does or how to make it work.

The second example is very close to working, except that it returns an
array, not a jQuery collection. So, let me try rephasing my question.
How do I create an empty jQuery collection?

I have actually acomplished this, but it's very ugly. Instead of the
following:

  var returnObject = [];   //creates an empty array

I used the following:

  var returnObject = $(this).not(this);

That seems pretty stupid to me, but it's the only way I could figure
out to create an empty jQuery collection, to which I can add
individual jQuery objects from inside my loop. Surely, there is a more
elegant way to create an empty jQuery collection.

The pushStack suggestion is great, btw.

Thanks again,

Larry


On Dec 12, 4:42 am, Wizzud <[EMAIL PROTECTED]> wrote:
> Simply return your new collection. How you get your new collection
> from the current object may well involve map(), but however you do it,
> all you need to do is return whatever collection you want to continue
> the chain with. It is probably advisable to use pushStack(), so that
> your original collection can be retrieved further along the 'chain' if
> desired (by using end()).
>
> eg.
>
> $.fn.myMethod = function() {
> return this.pushStack( this.map(function(i,elem) {
> //
> // return newElement
> //
>   }) );
>
> };
>
> or
>
> $.fn.myMethod = function() {
> var returnObject = [];
> this.each(function() {
> // var newElement = something based on 'this'
> // returnObject.push(newElement);
>   });
> return this.pushStack(returnObject);
>
> };
>
> or variations thereof.
>
> On Dec 12, 3:01 am, McLars <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a plugin that needs to return a different jQuery collection
> > than the one it was passed. In other words, each of the elements
> > passed in the original collection will create a new element, and I
> > want to return the new elements instead of the originals.
>
> > So, instead of something like this:
>
> > $.fn.myMethod = function() {
> > return this.each(function() {
> > //
> > // Create new element here
> > //
>
> > });
>
> > which returns the original element collection (preserves chaining),
> > I'm looking for an elegant way to return the new elements in a jQuery
> > collection.
>
> > I think maybe the $.map method might be part of the solution, but I'm
> > afraid I just can't understand how. Any help would be appreciated.
>
> > Thanks,
>
> > Larry- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Object architecture problem.

2007-12-12 Thread Danny

I actually agree strongly with you: plugins should be chainable. But
not all are (even some jQuery methods are not, like the ones that
return text [val(), html() etc. without arguments]).

On Dec 12, 9:47 pm, "Brian Cherne" <[EMAIL PROTECTED]> wrote:
> I want to disagree with Danny's first statement... if you're going to create
> a jQuery plug-in (re-usable and useful to all) then it's best to follow the
> convention of returning the elements it's acted on. If you want it to return
> something else (or nothing) don't create a plug-in -- instead create a
> separate global object w/methods.
>
> I haven't time to write the innards of the plug-in approach, but I'd
> recommend a syntax like:
>
> $('#photo').photo( method, settings ).css(...).attr(...);
>
> var createSettings = { src:uri };
> var cropSettings = {width:w,height:h};
>
> $('#photo').photo( 'create', createSettings ).photo( 'crop', cropSettings
> ).show();
>
> Chaining is one of the most powerful features of jQuery... let it work for
> you!
>
> Brian.
>
> On 12/12/07, Danny <[EMAIL PROTECTED]> wrote:
>
>
>
> > If you have no reason to chain your plugin (something like $
> > ('#photo').photo(...).css(...).attr(...) then having it return a
> > different object makes sense. But then, why put it in the jQuery
> > namespace at all? 'return new smaon.photo(...) makes as much sense.
> > Danny
>
> > On Dec 12, 10:38 am, Smaon <[EMAIL PROTECTED]> wrote:
> > > Thank you for your answer Danny.
>
> > > I'm currently trying this way:
>
> > > jQuery.fn.photo = function (...) {
> > > var canvas = $(this).get(0);
> > > return new jQuery.photo(canvas, settings);
>
> > > }
>
> > > jQuery.twistMap = function(canvas, settings){
> > >//create code
>
> > >this.crop = function(){
> > >..
> > >   }
>
> > > }
>
> > > usable like this:
>
> > > var photo = $("#photo").photo(...);
> > > photo.crop();
>
> > > What do you think? For me, while not being perfect, it seems more or
> > > less ok...
>
> > > PS: BTW, it there a way to put clean code in this discussion group?


[jQuery] Re: LavaLamp for jQuery 1.2.x?

2007-12-12 Thread Danny

I modified it to run under 1.2, with the most recent easing plugin:
http://youngisrael-stl.org/inc/jquery.lavalamp.js

On Dec 12, 10:21 pm, Andy Matthews <[EMAIL PROTECTED]> wrote:
> I'm really wanting to use Ganeshki's excellent LavaLamp plugin 
> (http://www.gmarwaha.com/blog/?p=7) but it appears that it doesn't work with
> the most current stable release of jQuery.
>
> Does anyone know if there's an updated release somewhere that meets
> the 1.2.x requirement? Or is there an alternate menu which gives the
> same effect?


[jQuery] No border on div when there should be?

2007-12-12 Thread Larry Garfield

Hi all.  I'm working on a little design assistance script/plugin/not sure yet 
in jQuery.  The intent is to be able to have jQuery automatically draw 
alignment grid lines over the page so that I can visually line up other 
elements on the page.  Code follows:

--
jQuery.grid = function(settings) {
  jQuery.extend(settings, {
color: '#000',
spacing: '20px',
orientation: 'horizontal',
thickness: '5px'
  });
  
  var wrapper = jQuery('').addClass('wrapper').css({
zIndex: 999,
position: 'absolute',
top: 0,
left: 0,
height: '100%',
width: '100%'
  });
  jQuery('body').append(wrapper);
  
  for (var i=0; i < 100; i ++) {
  var div = jQuery(' ')
.css('border-bottom-width', settings.thickness)
.css('border-color', settings.color)
.height(settings.spacing)
.width('100%');
  wrapper.append(div);
}
};

$(document).ready(function() {
  $.grid({});
});
--

When I run the above (using jQuery 1.2.1), all of my divs are created 
properly.  I can confirm in firebug that that I get 100 divs (later to be "as 
many as needed", when I get there), and that all have a style tag with the 
proper CSS rules in it.  However, I get no border.  I've tried changing the 
border color, border thickness, spacing... the divs create, but no border 
lines appear.

I don't know if this is technically a jQuery question or not, but does anyone 
have an idea why it could be misbehaving?  Alternatively, has someone already 
done this and saved me a lot of trouble? :-)

-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson


[jQuery] LavaLamp for jQuery 1.2.x?

2007-12-12 Thread Andy Matthews

I'm really wanting to use Ganeshki's excellent LavaLamp plugin (http://
www.gmarwaha.com/blog/?p=7) but it appears that it doesn't work with
the most current stable release of jQuery.

Does anyone know if there's an updated release somewhere that meets
the 1.2.x requirement? Or is there an alternate menu which gives the
same effect?


[jQuery] Re: Object architecture problem.

2007-12-12 Thread Brian Cherne
I want to disagree with Danny's first statement... if you're going to create
a jQuery plug-in (re-usable and useful to all) then it's best to follow the
convention of returning the elements it's acted on. If you want it to return
something else (or nothing) don't create a plug-in -- instead create a
separate global object w/methods.

I haven't time to write the innards of the plug-in approach, but I'd
recommend a syntax like:

$('#photo').photo( method, settings ).css(...).attr(...);

var createSettings = { src:uri };
var cropSettings = {width:w,height:h};

$('#photo').photo( 'create', createSettings ).photo( 'crop', cropSettings
).show();

Chaining is one of the most powerful features of jQuery... let it work for
you!

Brian.

On 12/12/07, Danny <[EMAIL PROTECTED]> wrote:
>
>
> If you have no reason to chain your plugin (something like $
> ('#photo').photo(...).css(...).attr(...) then having it return a
> different object makes sense. But then, why put it in the jQuery
> namespace at all? 'return new smaon.photo(...) makes as much sense.
> Danny
>
> On Dec 12, 10:38 am, Smaon <[EMAIL PROTECTED]> wrote:
> > Thank you for your answer Danny.
> >
> > I'm currently trying this way:
> >
> > jQuery.fn.photo = function (...) {
> > var canvas = $(this).get(0);
> > return new jQuery.photo(canvas, settings);
> >
> > }
> >
> > jQuery.twistMap = function(canvas, settings){
> >//create code
> >
> >this.crop = function(){
> >..
> >   }
> >
> > }
> >
> > usable like this:
> >
> > var photo = $("#photo").photo(...);
> > photo.crop();
> >
> > What do you think? For me, while not being perfect, it seems more or
> > less ok...
> >
> > PS: BTW, it there a way to put clean code in this discussion group?
> >
>


[jQuery] Re: [PLUGIN] JAddTo

2007-12-12 Thread Jason Levine


Thanks.  That should be fixed now.

-- 
View this message in context: 
http://www.nabble.com/-PLUGIN--JAddTo-tp14302539s27240p14309325.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: UI Tabs / Tabs 3

2007-12-12 Thread Klaus Hartl

On 12 Dez., 11:26, Richard W <[EMAIL PROTECTED]> wrote:
> I was wondering if there is any way of making the tabs still retain
> their original link after you have click on a tab.
> IE when you click on a tab, it goes selected but the link still
> remains and the cursor still remains as a link area, so when you are
> viewing the content of the selected tab, you still have the option of
> reloading the content of the tab you are viewing by clicking on the
> selected tab.
>
> Thank you for any suggestions.
> Richard

Which cursor is shown on a selected tab is declared in the CSS only
and can be changed easily... the class "ui-tabs-selected" has some
cursor declarations that need to be removed.

Reloading a selected tab can be achieved by using the tabsLoad method,
like (untested):

var $tabs = $('#id').tabs({
click: function(tab, panel) {
var selected = $tabs.tabsSelected();
if (selected == $('a', $tabs).index(tab) + 1) {
$tabs.tabsLoad(selected);
}
}
});


--Klaus


[jQuery] Re: Img Src replacement

2007-12-12 Thread Glen Lipka
Perfect thanks.  I didn't try that second one, but I will give it a go.

Glen

On Dec 12, 2007 1:24 PM, Mika Tuupola <[EMAIL PROTECTED]> wrote:

>
>
> On Dec 12, 2007, at 8:49 PM, Glen Lipka wrote:
>
> > I have a nav that I do not control the HTML Source.
> >
> > 
> >   
> >   
> > 
> >
> > I want to have a hover event applied to the IMG so that when you
> > hover over the img src changes from foo.gif to foo_on.gif and
> > bar.gif to bar_on.gif.
>
> http://www.appelsiini.net/2007/6/sequentially-preloading-images
>
> I use something like above. Includes hover image preloading.
>
> --
> Mika Tuupola
> http://www.appelsiini.net/
>
>


[jQuery] Re: Release: Validation plugin 1.1.2

2007-12-12 Thread Josh Nathanson


Good news Jorn.  Thanks for an awesome plugin.

-- Josh


- Original Message - 
From: "Jörn Zaefferer" <[EMAIL PROTECTED]>

To: "jQuery Discussion." 
Sent: Wednesday, December 12, 2007 2:26 PM
Subject: [jQuery] Release: Validation plugin 1.1.2




Hi,

I've just release version 1.1.2 of the validation plugin. Hot from the 
changelog:


* Replaced regex for URL method, thanks to the contribution by Scott 
Gonzalez, see http://projects.scottsplayground.com/iri/

* Improved email method to better handle unicode characters
* Fixed error container to hide when all elements are valid, not only on 
form submit

* Fixed String.format to jQuery.format (moving into jQuery namespace)
* Fixed accept method to accept both upper and lowercase extensions
* Fixed validate() plugin method to create only one validator instance for 
a given form and always return that one instance (avoids binding events 
multiple times)

* Changed debug-mode console log from "error" to "warn" level

So basically all the fixes that were only available using the 1.2 trunk 
are now available as a regular and stable release.


I'm also working on the documentation: 
http://docs.jquery.com/Plugins/Validation#Documentation
It isn't versioned yet, so you'll currently find a few 1.2 only features 
on that page, nonetheless, its much more up-to-date then what was 
available so far.


Have fun! Your feedback is welcome!

Jörn 




[jQuery] Re: Object architecture problem.

2007-12-12 Thread Danny

If you have no reason to chain your plugin (something like $
('#photo').photo(...).css(...).attr(...) then having it return a
different object makes sense. But then, why put it in the jQuery
namespace at all? 'return new smaon.photo(...) makes as much sense.
Danny

On Dec 12, 10:38 am, Smaon <[EMAIL PROTECTED]> wrote:
> Thank you for your answer Danny.
>
> I'm currently trying this way:
>
> jQuery.fn.photo = function (...) {
> var canvas = $(this).get(0);
> return new jQuery.photo(canvas, settings);
>
> }
>
> jQuery.twistMap = function(canvas, settings){
>//create code
>
>this.crop = function(){
>..
>   }
>
> }
>
> usable like this:
>
> var photo = $("#photo").photo(...);
> photo.crop();
>
> What do you think? For me, while not being perfect, it seems more or
> less ok...
>
> PS: BTW, it there a way to put clean code in this discussion group?
>


[jQuery] Re: dimensions plugin error

2007-12-12 Thread Eridius


I figured it out.


Eridius wrote:
> 
> I am getting this follow error and not sure what it means
> 
> [Exception... "'Dimensions: jQuery collection is empty' when calling
> method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
> (NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]
> 

-- 
View this message in context: 
http://www.nabble.com/dimensions-plugin-error-tp14301281s27240p14307201.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Release: Validation plugin 1.1.2

2007-12-12 Thread Alexandre Plennevaux
great work Jörn!

On Dec 12, 2007 11:26 PM, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I've just release version 1.1.2 of the validation plugin. Hot from the
> changelog:
>
> * Replaced regex for URL method, thanks to the contribution by Scott
> Gonzalez, see http://projects.scottsplayground.com/iri/
> * Improved email method to better handle unicode characters
> * Fixed error container to hide when all elements are valid, not only on
> form submit
> * Fixed String.format to jQuery.format (moving into jQuery namespace)
> * Fixed accept method to accept both upper and lowercase extensions
> * Fixed validate() plugin method to create only one validator instance
> for a given form and always return that one instance (avoids binding
> events multiple times)
> * Changed debug-mode console log from "error" to "warn" level
>
> So basically all the fixes that were only available using the 1.2 trunk
> are now available as a regular and stable release.
>
> I'm also working on the documentation:
> http://docs.jquery.com/Plugins/Validation#Documentation
> It isn't versioned yet, so you'll currently find a few 1.2 only features
> on that page, nonetheless, its much more up-to-date then what was
> available so far.
>
> Have fun! Your feedback is welcome!
>
> Jörn
>



-- 
Alexandre Plennevaux
LAb[au]

http://www.lab-au.com


[jQuery] Re: [PLUGIN] JAddTo

2007-12-12 Thread Jörn Zaefferer


Jason Levine schrieb:

This is my first JQuery plugin in awhile.  I needed to put up a series of
"Add To Digg"-style links on the  http://www.ShootingForACause.com/2008/
Shooting For A Cause  website.  After collecting the images and links, I
realized that this would make for a good JQuery plugin.  So I wrote it.

I hereby present  http://www.jasons-toolbox.com/JAddTo/ JAddTo 0.1 .  Enjoy!

And if you know of any links that should be added, let me know.  It would
help if you included an example link and the URL of an image that could be
included.
  
I've never ever got into using digg or whatever on that ever growing 
list is, so I guess I missed the point of social bookmarking entirely. 
On the other hand, I've got about 34 blogs in my feed reader, with at 
least eight having daily activity. Via those I get more then enough 
links to visit, often with a some entertaining or just useful, often 
enough well-written text explaining the value of the link.


So, lacking the basic appreciation of social bookmarking, I find those 
endless lists of meaningless icons, whereever I see them, useless or 
even annoying. Its a bit of bad luck that I felt to express that issue 
right here, because I don't want to rant about your work on the plugin 
or anything.


But maybe someone here can give me an idea whats its all about. Or how 
I'm supposed to identify all those weird icons.


Thanks
Jörn


[jQuery] Release: Validation plugin 1.1.2

2007-12-12 Thread Jörn Zaefferer


Hi,

I've just release version 1.1.2 of the validation plugin. Hot from the 
changelog:


* Replaced regex for URL method, thanks to the contribution by Scott 
Gonzalez, see http://projects.scottsplayground.com/iri/

* Improved email method to better handle unicode characters
* Fixed error container to hide when all elements are valid, not only on 
form submit

* Fixed String.format to jQuery.format (moving into jQuery namespace)
* Fixed accept method to accept both upper and lowercase extensions
* Fixed validate() plugin method to create only one validator instance 
for a given form and always return that one instance (avoids binding 
events multiple times)

* Changed debug-mode console log from "error" to "warn" level

So basically all the fixes that were only available using the 1.2 trunk 
are now available as a regular and stable release.


I'm also working on the documentation: 
http://docs.jquery.com/Plugins/Validation#Documentation
It isn't versioned yet, so you'll currently find a few 1.2 only features 
on that page, nonetheless, its much more up-to-date then what was 
available so far.


Have fun! Your feedback is welcome!

Jörn


[jQuery] jqchart

2007-12-12 Thread kylebuttress

Hello,

I'm using jqchart, and am finding it very nice. I'm wondering if there
is a way to have y values display on both sides of the chart so if you
have a chart with 2 sets of values you could have one side show 1 -
100 and the other side show 200 - 500 for example.


[jQuery] Re: [PLUGIN] JAddTo

2007-12-12 Thread David


Nice plugin but the add to example on the page has a spurl links for the 
simpy and smarking icons.


- David

Jason Levine schreef:

This is my first JQuery plugin in awhile.  I needed to put up a series of
"Add To Digg"-style links on the  http://www.ShootingForACause.com/2008/
Shooting For A Cause  website.  After collecting the images and links, I
realized that this would make for a good JQuery plugin.  So I wrote it.

I hereby present  http://www.jasons-toolbox.com/JAddTo/ JAddTo 0.1 .  Enjoy!

And if you know of any links that should be added, let me know.  It would
help if you included an example link and the URL of an image that could be
included.
  




[jQuery] Re: tablesorter onafer feature?

2007-12-12 Thread tarendol2002

Something like this should do the trick:

$(".tablesorter tr").mouseover(function() {$
(this).addClass("over");}).mouseout(function() {$
(this).removeClass("over");});

css:
table.tablesorter tr.over td {
background:#BCD4EC none repeat scroll 0% !important;
}


On 12 déc, 21:17, Arturo <[EMAIL PROTECTED]> wrote:
> I use a code to bgcolor odd table rows in my tables. Something like:
>
> 
> $('table').find('tr:odd').css({backgroundColor: '#fffbdd'});
> 
>
> And I'd like to keep the zebra-colouring after a table sorting with
> tablesorter().
> But I've looked at the docuentation on the plugin and it doesn't seem
> to provide a way to attach a function to the end of the
> tablesorting...
>
> Could this feature be added?  Can this be done by any other means?
>
> Thanks a lot (for the great plugin and the eventual responses)!!


[jQuery] Re: Img Src replacement

2007-12-12 Thread Mika Tuupola



On Dec 12, 2007, at 8:49 PM, Glen Lipka wrote:


I have a nav that I do not control the HTML Source.


  
  


I want to have a hover event applied to the IMG so that when you  
hover over the img src changes from foo.gif to foo_on.gif and  
bar.gif to bar_on.gif.


http://www.appelsiini.net/2007/6/sequentially-preloading-images

I use something like above. Includes hover image preloading.

--
Mika Tuupola
http://www.appelsiini.net/



[jQuery] Re: [PLUGIN] JAddTo

2007-12-12 Thread Jason Levine


By the way, future additions that I plan on incorporating are custom entries
(since I don't think I'd ever come close to having all possible entries) and
fly out effects (kind of a horizontal accordian thing).  For now, though,
this is a good 0.1 release.

-Jason Levine
-- 
View this message in context: 
http://www.nabble.com/-PLUGIN--JAddTo-tp14302539s27240p14303963.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: [PLUGIN] JAddTo

2007-12-12 Thread Benjamin Sterling
Nice work Jason.

On 12/12/07, Jason Levine <[EMAIL PROTECTED]> wrote:
>
>
>
> D'oh!  Thanks for pointing that out.  It should be fixed now.
>
> --
> View this message in context:
> http://www.nabble.com/-PLUGIN--JAddTo-tp14302539s27240p14303233.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com
> .
>
>


-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com


[jQuery] Re: [PLUGIN] JAddTo

2007-12-12 Thread Jason Levine


D'oh!  Thanks for pointing that out.  It should be fixed now.

-- 
View this message in context: 
http://www.nabble.com/-PLUGIN--JAddTo-tp14302539s27240p14303233.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] tablesorter onafer feature?

2007-12-12 Thread Arturo

I use a code to bgcolor odd table rows in my tables. Something like:


$('table').find('tr:odd').css({backgroundColor: '#fffbdd'});


And I'd like to keep the zebra-colouring after a table sorting with
tablesorter().
But I've looked at the docuentation on the plugin and it doesn't seem
to provide a way to attach a function to the end of the
tablesorting...

Could this feature be added?  Can this be done by any other means?

Thanks a lot (for the great plugin and the eventual responses)!!


[jQuery] Re: [PLUGIN] JAddTo

2007-12-12 Thread Jonathan Sharp
http://www.jasons-toolbox.com/JavaScript/jquery-1.2.1.pack.js 404's..oops!

-js


On Dec 12, 2007 1:58 PM, Jason Levine <[EMAIL PROTECTED]> wrote:

>
>
> This is my first JQuery plugin in awhile.  I needed to put up a series of
> "Add To Digg"-style links on the  http://www.ShootingForACause.com/2008/
> Shooting For A Cause  website.  After collecting the images and links, I
> realized that this would make for a good JQuery plugin.  So I wrote it.
>
> I hereby present  http://www.jasons-toolbox.com/JAddTo/ JAddTo 0.1 .
>  Enjoy!
>
> And if you know of any links that should be added, let me know.  It would
> help if you included an example link and the URL of an image that could be
> included.
> --
> View this message in context:
> http://www.nabble.com/-PLUGIN--JAddTo-tp14302539s27240p14302539.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com
> .
>
>


[jQuery] [PLUGIN] JAddTo

2007-12-12 Thread Jason Levine


This is my first JQuery plugin in awhile.  I needed to put up a series of
"Add To Digg"-style links on the  http://www.ShootingForACause.com/2008/
Shooting For A Cause  website.  After collecting the images and links, I
realized that this would make for a good JQuery plugin.  So I wrote it.

I hereby present  http://www.jasons-toolbox.com/JAddTo/ JAddTo 0.1 .  Enjoy!

And if you know of any links that should be added, let me know.  It would
help if you included an example link and the URL of an image that could be
included.
-- 
View this message in context: 
http://www.nabble.com/-PLUGIN--JAddTo-tp14302539s27240p14302539.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: intent of $('selector').title() call

2007-12-12 Thread John Resig

Nope, not in the API anymore, it's equivalent to:

.attr("title", errMsg.required)

--John

On Dec 12, 2007 1:33 PM, howardk <[EMAIL PROTECTED]> wrote:
>
> John's got an example of chaining in his book, "Pro JavaScript
> Techniques", that isn't working for me. More importantly, I don't
> understand what the code is intending to do, so I can make an attempt
> to fix it. The code in general is adding a help cursor and a red star
> to a field in a form to indicate that the field is required. The chain
> looks something like this:
>
> $('input.required')
>  .prev('label')
>  .css('cursor','help')
>  .title(errMsg.required)
>  .append('*');
>
> I've substituted my own explicit error message for errMsg.required,
> but javascript complains that .title( "..." ) is not a function. It's
> not in the current API. What is the intent of this call?
>
> Howard
>


[jQuery] intent of $('selector').title() call

2007-12-12 Thread howardk

John's got an example of chaining in his book, "Pro JavaScript
Techniques", that isn't working for me. More importantly, I don't
understand what the code is intending to do, so I can make an attempt
to fix it. The code in general is adding a help cursor and a red star
to a field in a form to indicate that the field is required. The chain
looks something like this:

$('input.required')
 .prev('label')
 .css('cursor','help')
 .title(errMsg.required)
 .append('*');

I've substituted my own explicit error message for errMsg.required,
but javascript complains that .title( "..." ) is not a function. It's
not in the current API. What is the intent of this call?

Howard


[jQuery] Re: Img Src replacement

2007-12-12 Thread Michael Geary
This would do the trick:
$(function() {
$('.nav a img').hover(
function() {
this.src = this.src.replace( /\.gif$/, '_on.gif' );
},
function() {
this.src = this.src.replace( /_on\.gif$/, '.gif' );
}
);
});
-Mike


  _  

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Glen Lipka
Sent: Wednesday, December 12, 2007 10:49 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Img Src replacement


I have a nav that I do not control the HTML Source.


   
  


I want to have a hover event applied to the IMG so that when you hover over
the img src changes from foo.gif to foo_on.gif and bar.gif to bar_on.gif.

How do you do that replace hover?

Glen




[jQuery] Img Src replacement

2007-12-12 Thread Glen Lipka
I have a nav that I do not control the HTML Source.


  
  


I want to have a hover event applied to the IMG so that when you hover over
the img src changes from foo.gif to foo_on.gif and bar.gif to bar_on.gif.

How do you do that replace hover?

Glen


[jQuery] dimensions plugin error

2007-12-12 Thread Eridius


I am getting this follow error and not sure what it means

[Exception... "'Dimensions: jQuery collection is empty' when calling method:
[nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]
-- 
View this message in context: 
http://www.nabble.com/dimensions-plugin-error-tp14301281s27240p14301281.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jquery json and zend_json

2007-12-12 Thread Benjamin Sterling
Two quick questions:
what version of php are you running?  I believe that zend only supports
php5, but I could be wrong on that.

In firebug, what is being returned in the "response" tab?

On 12/12/07, jforth <[EMAIL PROTECTED]> wrote:
>
>
> I'm trying to test something here and having issues getting it to
> work.
>
> here's my jquery script : // I should get an alert object if it works?
> but in firebug all I get is invalid label.
>
> var url = "http://127.0.0.1/projects/micro-printing.com/projects/
> micro-server/index.php/client_api/test?callback=?";
> $.getJSON(url,
> function(data){
> alert(data);
> });
>
> heres the json that I'm  getting using zend_json:
>
> {"job_Description":"My Job","job_Notes":"My jobs notes are here."}
>
> and here's the php in case it helps
>
> $json = new Zend_Json();
> $job_data = array(
> 'job_Description' => 'My Job' ,
> 'job_Notes' => 'My jobs notes are here.');
>
> echo $json->encode($job_data);
>



-- 
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com
http://www.benjaminsterling.com


[jQuery] tablesorter IE6 date sorting bug

2007-12-12 Thread [EMAIL PROTECTED]

Hi all,

I was going to post this in the jQuery plugins group, but I see
traffic there is next to nil.  I've been using jQuery and its
associated plugins for about six months now.  I lurk this group a lot
and have learned a ton from everyone here, so thanks!  Now, on to my
question.  I've been using the awesome tablesorter plugin for awhile
now and have come across a scenario where FF behaves differently than
IE.  Visit this page in IE6 and try to sort twice on the first column.

http://gtvault.com/tablesorter/tablesorter.htm

* sorry, there are no up/down images, but tablesorter is in fact
working on this table!

This table sorts without issue in FF2, but in IE6 (not sure about 7)
the "Run Date" column sorts only in ascending order even when clicked
twice.  I've turned debug on and found that the column is defaulting
to the usShortDate sorter.  I tried forcing the usLongDate sorter to
no avail  Do any of you tablesorter experts have an idea of what might
be happening?

Thanks,
haylo


[jQuery] Limit lines and characters of textarea

2007-12-12 Thread sidisinsane

This is what I'm trying to do with a textarea.
1. Limit number of characters
2. Limit number of lines
3. Diminish linelimit if characters in line exceed charlimit/linelimit
4. Substract number of "lost" chararacters from charlimit if linebreak
("\n") is provoked
5. Disable input when either limit is reached

So far I have managed to get 1, 2 and 5 (buggy) to work with the
following function. A demo can tested at 
http://sidisinsane.com/sandbox/jquery/limitentry/

function limitEntry(txtid,infid,linelimit,charlimit)
{
var txt = $('#'+txtid).val();
var txtlength = txt.length;
var line = txt.replace(/\s+$/g,"");
var split = line.split("\n");
var splitlength = split.length;

if(splitlength > linelimit || txtlength > charlimit)
{
$('#'+infid).html('Your entry has reached its limit!');
$('#'+txtid).val(txt.substr(0,linelimit));
$('#'+txtid).val(txt.substr(0,charlimit));
return false;
}else{
$('#'+infid).html((linelimit - splitlength)+' lines and 
'+
(charlimit - txtlength)+' characters left.');
return true;
}
}

$(document).ready(function()
{
$(function()
{
$('#entry').keyup(function()
{
limitEntry('entry','counter',5,100);
})
});
});

I've tried a couple of things but didn't quite manage to achieve my
goals. I could use some help on this one.


[jQuery] Re: Object architecture problem.

2007-12-12 Thread Smaon

Thank you for your answer Danny.

I'm currently trying this way:

jQuery.fn.photo = function (...) {
var canvas = $(this).get(0);
return new jQuery.photo(canvas, settings);
}


jQuery.twistMap = function(canvas, settings){
   //create code

   this.crop = function(){
   ..
  }
}


usable like this:

var photo = $("#photo").photo(...);
photo.crop();


What do you think? For me, while not being perfect, it seems more or
less ok...

PS: BTW, it there a way to put clean code in this discussion group?


On 12 déc, 04:47, Danny <[EMAIL PROTECTED]> wrote:
> It sounds like you want a way to create namespaces for plugins. There
> isn't an "official" way, but I wrote a small function to create
> namespaces that was discussed on a previous 
> thread:http://www.nabble.com/Re%3A-passing-this-p13540912s27240.html
>
> Also, it looks like your functions jQuery.Photo.create are actually
> meant to be plugins (i.e. they refer to 'this' as a jQuery object) so
> they should not be part of the jQuery object itself. Just do
> jQuery.fn.extend ({
>photocreate: function(settings){
> 
> },
> photocrop: function(...){
> 
> }
>
> });
>
> Or, if using my namespace plugin,
> $.namespace ('photo', {
>create: function(settings){
> 
> },
> crop: function(...){
> 
> }
>
> });
>
> Danny
> On Dec 11, 6:43 pm, Smaon <[EMAIL PROTECTED]> wrote:
>
> > Hi everybody,
>
> > ok, I'm in a big trouble right now. Let me try to explain my
> > problem :)
>
> > I'm trying to create a simple photo editing system. I need to define a
> > DIV as the canvas, then to have many methods applicables to this
> > object.
>
> > My first reflex was to create a jQuery extension, something like this
> > (just to give the idea):
>
> > jQuery.Photo = {
> > create: function(settings){
> > 
> > }),
> > crop: function(...){
> > 
> > }
>
> > };
>
> > jQuery.fn.extend(
> > {
> > Photo: jQuery.Photo.create,
> > crop: jQuery.Photo.crop
>
> > });
>
> > Very well, now I was able to create my editable photo by using $
> > ("#photo").Photo() and to crop by using $("#photo").crop()
>
> > BUT, the problem is that I need to extend jQuery with every method I
> > want to use on my photos. For example crop() is now in the global
> > scope, and this is very ugly. To do well I should name it PhotoCrop,
> > but this I don't find it's a good solution. What I would like is to
> > have methods only usable on instances of the Photo object, in its
> > local scope. For ex, in core javascript it would be like that:
>
> > function Photo(){
> > ...
>
> > }
>
> > Photo.prototype.crop = function(){
> > ...
>
> > }
>
> > The problem is that I don't find any way to do this properly with
> > jQuery. Maybe somebody here could help me?
>
> > Many thanks in advance!
>
> > Smaon


[jQuery] Re: How to toggle "display" value?

2007-12-12 Thread KidsKilla .grin! wuz here
Guys. Everything is much simplier.
 has the other value for display property, than block it's table-cell.

change your html code:





Add a gift message:




2007/12/12, R. Rajesh Jeba Anbiah <[EMAIL PROTECTED]>:
>
> On Dec 12, 8:42 am, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
> > Dave, the .toggle() effect should work
>
>
>I presume, it's the problem that I pointed out couple of months
> before
> http://groups.google.com/group/jquery-en/msg/5bd84051624cc1b3
>
> --
>   
> Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/
>


-- 
Максим Игоревич Гришаев,
AstroStar.ru


[jQuery] Re: $.get and $.ajaxSetup

2007-12-12 Thread KidsKilla .grin! wuz here
$.get('http://mylogin:[EMAIL PROTECTED]', data, callback)

2007/12/11, Dado <[EMAIL PROTECTED]>:
>
> $.get does not seem to comply to the defaults set with $.ajaxSetup. Is
> this a bug or a feature? Alternatively, I would like to have
> customized $.ajax calls ala $.getJSON. For example, something like
> $.getJSONPwithBasicAuth(url, data, callback, username, password) and
> have datatype default to 'jsonp' and request headers automagically
> setup for basic auth.
>
> How would I go about defining my own customized $.get ajax functions?
>
> Thanx in advance for your precious help!
>
> Dado
>


-- 
Максим Игоревич Гришаев,
AstroStar.ru


[jQuery] jquery json and zend_json

2007-12-12 Thread jforth

I'm trying to test something here and having issues getting it to
work.

here's my jquery script : // I should get an alert object if it works?
but in firebug all I get is invalid label.

 var url = "http://127.0.0.1/projects/micro-printing.com/projects/
micro-server/index.php/client_api/test?callback=?";
 $.getJSON(url,
function(data){
alert(data);
});

heres the json that I'm  getting using zend_json:

{"job_Description":"My Job","job_Notes":"My jobs notes are here."}

and here's the php in case it helps

$json = new Zend_Json();
$job_data = array(
'job_Description' => 'My Job' ,
'job_Notes' => 'My jobs notes are here.');

echo $json->encode($job_data);


[jQuery] Re: ui.datepicker causes IE "operation aborted"

2007-12-12 Thread KidsKilla .grin! wuz here
This problem caused in IE not because of jQuery bug, but because of IE bug.
IE doesn't allow to work with DOM untill it's fully downloaded and be ready.
This is why everything works fine inside $(document).ready()
there is 2 ways to fix it:
1. initialize everything in $(document).ready()
2. paste your script tags in head or directly in body tag. (i mean
there have to be no parent tags)

search for "Operation aborted"
http://channel9.msdn.com/wiki/default.aspx/Channel9.InternetExplorerProgrammingBugs


2007/12/12, Dan M <[EMAIL PROTECTED]>:
>
> Charles,
>
> I have a feeling you need to switch your $(document).ready() function
> to a $(window).load() function. Let me know if that works for you.
>
> Regards,
> Dan
>
> On Dec 8, 5:26 pm, Charles Johnson <[EMAIL PROTECTED]> wrote:
> > I believe this bug was supposed to have been fixed in the move from
> > jQuery Calendar to ui.datepicker, but I'm still seeing sporadic
> > "Operation Aborted" errors in Internet Explorer, both 6 and 7, when
> > the datepicker is initialized. Frustrating problem because it's very
> > intermittent.
> >
> > The code I'm using is pretty simple; in the HTML:
> >
> >  > readonly="readonly" />
> >
> > Then in the $(document).ready function, I instantiate the datepicker
> > with this:
> >
> > $('#calendarDaily').datepicker({
> > showOn: 'button',
> > speed: 'fast',
> > buttonImageOnly: true,
> > buttonImage: '/dailyarchives.jpg',
> > buttonText: 'Calendar',
> > minDate: new Date(2001, 2 - 1, 7),
> > dateFormat: 'YMD-',
> > onSelect: function(thedate) {
> > eval("parent.location='/index.php?date=" + thedate + "'");
> > }
> >
> > });
> >
> > Works fine in all flavors of Mozilla/Firefox, and in Safari -- IE is
> > the only problem.
>


-- 
Максим Игоревич Гришаев,
AstroStar.ru


[jQuery] Re: Using jQuery to track advert clicks

2007-12-12 Thread Darren Savery


Hi everyone,

Thanks for the help. I ended up using Chris's example. It didn't work
at first so I changed the code. Here is the finished jQuery code in
case anyone is interested :

$(document).ready(function() {
$("a.adtrack").click(function(){

//Get url of image advert
var adURL = $("a.adtrack").attr("href");

$.ajax({
   type: "GET",
   url: "adtrackingpage.asp",
   data: "advertURL=" + adURL
  });
 });
});

On the tracking page, I used the following ASP VBScript :

<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
  If condition = "" Then
MM_IIf = ifFalse
  Else
MM_IIf = ifTrue
  End If
End Function
%>
<%

Set Insert = Server.CreateObject ("ADODB.Command")
Insert.ActiveConnection = MM_Tracking_STRING
Insert.CommandText = "INSERT INTO dbo.adtracker (URL)  VALUES (?) "
Insert.Parameters.Append Insert.CreateParameter("varTitle", 200, 1,
50, MM_IIF(Request.Querystring("advertURL"),
Request.Querystring("advertURL"), Insert__varTitle & ""))
Insert.CommandType = 1
Insert.CommandTimeout = 0
Insert.Prepared = true
Insert.Execute()

%>

Works perfectly!

For those that are interested and might have a use for it in future,
one of the most important factors in search engine rankings (at the
moment) is direct inbound links from other websites e.g. (A - B).
People using click tracking usually use a tracking page that sits
between these 2 e.g. (A - C -B). In doing so, the link 'love' isn't
passed on to the target URL. Using the above code, the link is left
inact while tracking still occurs. Sweet!

Thanks!


[jQuery] UI draggable working but not without errors

2007-12-12 Thread Peter Bengtsson


I download the jquery-ui.min.js by just selecting the Draggable plugin 
which produced an 18K file.

$('table.draggable').draggable();
actually works just fine on my page. It even works in IE 6.

BUT! I'm getting errors in Firebug and the Error Console. And on IE6 I'm 
getting some error warnings. When I load the page I first get this::


  "$.ui[w] has no properties"jquery-ui.min.js (line 8)

(since it's minified it doesn't really make sense to show what's on line 8)

When I start dragging the element I get another error::

 "$(this.helper).outerWidth is not a function"   jquery-ui.min.js (line 23)

I'm using jquery-1.2.1.min.js.
The second error about outerWidth goes away when I also install dimensions.



--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com


[jQuery] Re: How to toggle "display" value?

2007-12-12 Thread [EMAIL PROTECTED]

I changed the "block" attribute value to "table-row" as per Karl's
suggestion and everything works great.

Thanks, - Dave

On Dec 11, 9:42 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Actually, there are two .toggle() methods, just as there are  
> two .load() methods.
>
> The .toggle() effect takes an optional 
> speed:http://docs.jquery.com/Effects/toggle
>
> The .toggle() event takes two 
> functions:http://docs.jquery.com/Events/toggle#fnfn
>
> Dave, the .toggle() effect should work. I just copied and pasted your  
> HTML and then toggled the  using Firebug, and it worked for me. It  
> doesn't work perfectly in Firefox, however. And I think it's because  
> you've added style="display: block" to it. Firefox expects table rows  
> to have display: table-row, while (I think) IE uses display: block. If  
> you remove that inline style, and don't include the optional speed  
> to .toggle(), it works fine.
>
> --Karl
> _
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Dec 11, 2007, at 5:51 PM, sawmac wrote:
>
>
>
>
>
> > $(document).ready(
> >function () {
> >$('[EMAIL PROTECTED]"radio"]').click( function() {
> >$('#giftMsg').toggle($(this).show(),$
> > (this).hide());
> >});
> >}
> > );
>
> > toggle() takes 2 functions as arguments
>
> > --dave- Hide quoted text -
>
> - Show quoted text -


[jQuery] jqModal iframe window content

2007-12-12 Thread Alexandre Plennevaux


hi all!


i was wondering if anyone has achieved to use jqModal to actually display
content in an iframe (instead of doing an ajax call). On Brice's page, he
says "Inline or remote (ajax/iframe) Window Content." has an available
feature, but i haven't managed to do so.

I thought using an iframe as window container would do the trick but
apparently not... Anyone knows more about it ?


thank you,

Alexandre
-- 
View this message in context: 
http://www.nabble.com/jqModal-iframe-window-content-tp14299200s27240p14299200.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: loading xml in IE6/IE7 on a CD

2007-12-12 Thread Bernd Matzner

Hi Benjamin,

I'm currently struggling with a similar error. Possibly the xml data
isn't transmitted as XML?

$.ajax({
type: 'GET',
url: xmlFile,
dataType: 'xml',
success: function(){},
error: function(x, s, e){}
});

If I use JSON, things are working nicely. Any chance to change your
xmlfile to json format?

This

shouldn't have anything to do with the error. It's supposed to work
around the loading of scripts, but it doesn't seem to have any effect
when I use it with external scripts (such as jquery.js). So, to run it
gracefully from a CD in IE, I use http://www.phdcc.com/shellrun/

Bernd



[jQuery] Re: plugin to reorder children elements of selected elements

2007-12-12 Thread Flesler

Oh, you were also appending, I didn't realize.
You can still do (in a plugin if you want)

this.children().sort(.).appendTo(this).end().end();

On Dec 12, 12:10 pm, Flesler <[EMAIL PROTECTED]> wrote:
> Just in case you are interested, you could do:
>
> $.fn.sort = function( sorter ){
>   return this.pushStack( this.get().sort(sorter) );
>
> };
>
> On Dec 11, 9:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>
>
> > I needed to randomly reorder the 's in a  each time the page
> > loaded. I couldn't find anything to do this that would actually show
> > all the elements at once -- everything I found was slideshow-related
> > -- so I wrote a little plugin:
>
> >http://blog.rebeccamurphey.com/2007/12/11/jquery-plugin-randomly-reor...
>
> > In my particular case today, I needed it to randomly reorder a list of
> > case studies, but I can imagine other uses as well. Curious for any
> > thoughts/suggestions for improvement.- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: plugin to reorder children elements of selected elements

2007-12-12 Thread Flesler

Just in case you are interested, you could do:

$.fn.sort = function( sorter ){
  return this.pushStack( this.get().sort(sorter) );
};

On Dec 11, 9:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I needed to randomly reorder the 's in a  each time the page
> loaded. I couldn't find anything to do this that would actually show
> all the elements at once -- everything I found was slideshow-related
> -- so I wrote a little plugin:
>
> http://blog.rebeccamurphey.com/2007/12/11/jquery-plugin-randomly-reor...
>
> In my particular case today, I needed it to randomly reorder a list of
> case studies, but I can imagine other uses as well. Curious for any
> thoughts/suggestions for improvement.


[jQuery] Re: loading xml in IE6/IE7 on a CD

2007-12-12 Thread Benjamin Sterling

Wondering if anyone has a solution for this?

On Dec 11, 9:49 pm, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
> Hey guys,
> I know I did this before with jQuery v1.1 where I was able to load an xml
> file in IE6/IE7 on a cd, but can't find the code I wrote.  Currently I am
> doing the code below and I can get it to work in FX, but not IE.
>
> IE7 is giving me an error of: Error: Permission denied
> IE6 is giving me an error of: parsererror: undefined
>
> $.ajax({
> url: xmlFile,
> dataType: 'xml',
> async : false,
> success: function(){},
> error: function(x, s, e){}
> });
>
> I put the below in the head of the htm file thinking that it would help, but
> no luck.
>
> 
>
> --
> Benjamin 
> Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.comhttp://www.benjaminsterling.com


[jQuery] Re: ui.datepicker causes IE "operation aborted"

2007-12-12 Thread Dan M

Charles,

I have a feeling you need to switch your $(document).ready() function
to a $(window).load() function. Let me know if that works for you.

Regards,
Dan

On Dec 8, 5:26 pm, Charles Johnson <[EMAIL PROTECTED]> wrote:
> I believe this bug was supposed to have been fixed in the move from
> jQuery Calendar to ui.datepicker, but I'm still seeing sporadic
> "Operation Aborted" errors in Internet Explorer, both 6 and 7, when
> the datepicker is initialized. Frustrating problem because it's very
> intermittent.
>
> The code I'm using is pretty simple; in the HTML:
>
>  readonly="readonly" />
>
> Then in the $(document).ready function, I instantiate the datepicker
> with this:
>
> $('#calendarDaily').datepicker({
> showOn: 'button',
> speed: 'fast',
> buttonImageOnly: true,
> buttonImage: '/dailyarchives.jpg',
> buttonText: 'Calendar',
> minDate: new Date(2001, 2 - 1, 7),
> dateFormat: 'YMD-',
> onSelect: function(thedate) {
> eval("parent.location='/index.php?date=" + thedate + "'");
> }
>
> });
>
> Works fine in all flavors of Mozilla/Firefox, and in Safari -- IE is
> the only problem.


[jQuery] UI Tabs / Tabs 3

2007-12-12 Thread Richard W

I was wondering if there is any way of making the tabs still retain
their original link after you have click on a tab.
IE when you click on a tab, it goes selected but the link still
remains and the cursor still remains as a link area, so when you are
viewing the content of the selected tab, you still have the option of
reloading the content of the tab you are viewing by clicking on the
selected tab.

Thank you for any suggestions.
Richard


[jQuery] jCarousel custom clipping and variable sizing of both list and items - any ideas on howto?

2007-12-12 Thread Kabelkultur Gotland

Hi, I'm trying to configure a jcarousel to use in a navigation menu
system.

 - The width of the div containing the list is 100% and before the
implementation of the carousel, overflow:hidden would nicely hide the
li elements that vas overflowing, including the item that was only
partially visible.

I am trying to use the carousel to be able to set prev/next buttons to
show more items if there are overflowing items in the list. The list
is generated through a php application depending on user status and
position in the application, so there is no way to determine how many
items there will be, or how wide these items will be. The list items
are used tobuild at tab style menu using a version of the css sliding
doors technique.

 - I have managed to get the carousel to accept variable item width
simply by using min-width: in the css instead of width:

so, probem number one: Standard css overflow:hidden actually detects
if a list item is only partially visible within the parent container,
and hides it. But the carousel clip somehow disables this function,
and you get items that are shown partially, sticking out from the clip
edge. Is there any way to get the carousel to mimig standard overflow
behaviour, or disable the clip and actually make use of css
overflow:hidden instead?

Problem number two: The parent container is part of a css site layout
that has a collapsible left column. As of now, when I collapse the
left column, the carousel still indicates that there is more items(by
active next-button) whan I toggle the left side off and by doing that
have all the list items visible. and if I click the next button in
that state, it goes disabled. However, if I toggle back the left
column, the next button still stays inactive even though soome of the
list elements are no longer visible. Is there any good way of making
the carousel detect the toggling automatically, or maybe a way to
trigger a recalculation of the carousel to include in the toggle
function?

I'm pretty crappy with javascript, so any help is appreciated. I'm
currently working with this project in a restricted environment, but
if anyone thinks they can do some good by viewing this live, let me
know and I will set up a demo somewhere.


[jQuery] tutorial code doesn't work :-(

2007-12-12 Thread priti

hi,

I am relatively new in jquery.I just installed and was sailing thru
tutorial.But somehow i was not able to run following code
$("a")
   .filter(".clickme")
 .click(function(){
   alert("You are now leaving the site.");
 })
   .end()
   .filter(".hideme")
 .click(function(){
 alert('hide');
   $(this).hide();
   return false;
 })
   .end();



html
 http://google.com/"; class="clickme">I give a message when
you leave
 http://yahoo.com/"; class="hideme">Click me to hide!
 http://microsoft.com/";>I'm a normal link

i installed the latest version.

Can someone explain where i might be missing.

Regards,
Priti


[jQuery] Re: Discussion in french

2007-12-12 Thread dehneg

Have a look to http://listes.rezo.net/mailman/listinfo/jquery-fr


On Dec 11, 9:20 pm, "Haingotiana A." <[EMAIL PROTECTED]> wrote:
> Hi all !
>
> Does anyone know if jquery discussion exist in french.
>
> Thanks.


[jQuery] Re: Escape HTML Entities

2007-12-12 Thread jimmeah

Thank you, but this still does not seem to work.

And i can't seem to get $.post to work properly as well
if i execute it like this:


$("#previewform").children(".sendtextfield").each(function(){
$.post("import/createpreview.php", { 
fieldname: $
(this).attr("name"), text: $(this).attr("value") });
});

It ends up sending nothing?
Firebug says it has sent stuff, but my database disagrees.




On 11 dec, 20:27, "Nguyễn Quốc Vinh" <[EMAIL PROTECTED]> wrote:
> Hi, i'm vietnamese! We use much à ấ ú ù ổ...,too! I set character to UTF-8!
> I sent data in input field with POST method! And all is ok!
> U try to set character is UTF-8 as me!
>
> id12titleHôn nhân
> DateTue, 01 Jan 2002 07:48:38 GMTServerApache/2.2.6 (Win32) PHP/5.2.4
> X-Powered-ByPHP/5.2.4ExpiresThu, 19 Nov 1981 08:52:00 
> GMTCache-Controlno-store,
> no-cache, must-revalidate, post-check=0, pre-check=0Pragmano-cache
> Content-Length144Keep-Alivetimeout=5, max=100ConnectionKeep-Alive
> Content-Typetext/xmlRequest Headers
> HostlocalhostUser-AgentMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
> 1.8.1.9) Gecko/20071025 Firefox/2.0.0.9Accept
> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=
> 0.8,image/png,*/*;q=0.5Accept-Languageen-us,en;q=0.5Accept-Encoding
> gzip,deflateAccept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive300
> Connectionkeep-aliveContent-Typeapplication/x-www-form-urlencoded
> X-Requested-WithXMLHttpRequestRefererhttp://localhost/lifecolor/man/index.php?act=mancatContent-Length32Co...
> uid=1; upass=34d365d5c03ce54fc4ecab4e11206120;
> mnm_key=Z29kOjIyNjlvT1NrdkJ6NVE6ZmU4M2QyNDg0ZWZhZDA2NGYxYzI2NDU2YWY5Y2UxMGY%3D;
> mnm_user=god; style=null; PHPSESSID=f4a47c2e181438c1f85351cd3b5a3557Pragma
> no-cacheCache-Controlno-cache
>
> 2007/12/12, jimmeah <[EMAIL PROTECTED]>:
>
>
>
>
>
> > Hej everyone, i got some problems on html entities within my script.
>
> > I am kinda building a CMS, but it is for a swedish website, so they
> > use lots and lots of öäë.
>
> > Now I gather my input fields from the document and post it to a php
> > file like this:
>
> > --
>
> > $(".createpreview").click(function()
> >   {
> > $("#previewform").children().each(function()
> > {
> > $.get("import/createpreview.php", { fieldname: $
> > (this).attr("name"), text: $(this).attr("value") });
> > });
> >   }
>
> > For instance i have an input field which says:
>
> > * Välkommen
>
> > but when sending the document created is
>
> > * GET
> >http://localhost/cms/import/createpreview.php?fieldname=title&text=V%...
> > (281ms)
>
> > My database displays:
>
> > * vã¤llkommen
>
> > And my fetched result back into the page displays:
>
> > * v�llkommen
>
> > How can i solve this problem? And where is my capital going to!? I
> > know about html entities and html enities converters like
> >http://www.w3clubs.com/htmlentities.phpbut when i apply such html
> > entity converter my results turn into:
>
> > * vällkommen
>
> > which is near what i want it to be, but still no caps and i want it
> > just to be
>
> > * Vällkommen
>
> > could someone help me out with a quick solution?
>
> --
> -
> Khi bàn luận nghiêm túc:
> 1) Lòng tự ái càng cao thì lòng tự trọng càng thấp.
> 2) "Tôi chưa thấy bao giờ" có nghĩa là kiến thức còn hạn hẹp.
> 3) "Đâu/ai mà chẳng thế" đồng nghĩa với sự đoán mò & vơ đũa cả nắm.
> /
> 
> Nguyễn Quốc Vinh
> 59/29 Duy Tân - Huế
> +84-975001226
> +84-988433498


[jQuery] Re: Escape HTML Entities

2007-12-12 Thread Yılmaz Uğurlu
Use encodeURIComponent() with your parameters. I'm creating Turkisj web site
and i have a lot Turkish character like ş ğ ı ç ö. I'm using UTF-8 all of my
files for the enconding. And I'm sending all post and get datas with
encodeURIComponent() function over the javascript and jquery.

2007/12/11, Nguyễn Quốc Vinh <[EMAIL PROTECTED]>:
>
> Hi, i'm vietnamese! We use much à ấ ú ù ổ...,too! I set character to
> UTF-8! I sent data in input field with POST method! And all is ok!
> U try to set character is UTF-8 as me!
>
> id12titleHôn nhân
> DateTue, 01 Jan 2002 07:48:38 GMT ServerApache/2.2.6 (Win32) PHP/5.2.4
> X-Powered-By PHP/5.2.4ExpiresThu, 19 Nov 1981 08:52:00 
> GMTCache-Controlno-store, no-cache, must-revalidate, post-check=0, pre-check=0
> Pragmano-cacheContent-Length 144Keep-Alivetimeout=5, 
> max=100ConnectionKeep-Alive
> Content-Typetext/xml Request Headers
> HostlocalhostUser-AgentMozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
> 1.8.1.9) Gecko/20071025 
> Firefox/2.0.0.9Accepttext/xml,application/xml,application/xhtml+xml,text/html;q=
> 0.9,text/plain;q=0.8,image/png,*/*;q=0.5Accept-Languageen-us,en;q=0.5Accept-Encoding
> gzip,deflateAccept-CharsetISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive300
> Connectionkeep-aliveContent-Type application/x-www-form-urlencoded
> X-Requested-WithXMLHttpRequest Referer
> http://localhost/lifecolor/man/index.php?act=mancatContent-Length 
> 32Cookiemaintab=register;
> uid=1; upass=34d365d5c03ce54fc4ecab4e11206120;
> mnm_key=Z29kOjIyNjlvT1NrdkJ6NVE6ZmU4M2QyNDg0ZWZhZDA2NGYxYzI2NDU2YWY5Y2UxMGY%3D;
> mnm_user=god; style=null; PHPSESSID=f4a47c2e181438c1f85351cd3b5a3557Pragma
> no-cache Cache-Controlno-cache
>
> 2007/12/12, jimmeah <[EMAIL PROTECTED] >:
> >
> >
> > Hej everyone, i got some problems on html entities within my script.
> >
> > I am kinda building a CMS, but it is for a swedish website, so they
> > use lots and lots of öäë.
> >
> > Now I gather my input fields from the document and post it to a php
> > file like this:
> >
> > --
> >
> > $(".createpreview").click(function()
> >   {
> > $("#previewform").children().each(function()
> > {
> > $.get("import/createpreview.php", { fieldname: $
> > (this).attr("name"), text: $(this).attr("value") });
> > });
> >   }
> >
> >
> > For instance i have an input field which says:
> >
> > * Välkommen
> >
> > but when sending the document created is
> >
> > * GET
> > http://localhost/cms/import/createpreview.php?fieldname=title&text=V%C3%A4llkommen
> > (281ms)
> >
> > My database displays:
> >
> > * vã¤llkommen
> >
> > And my fetched result back into the page displays:
> >
> > * v�llkommen
> >
> > How can i solve this problem? And where is my capital going to!? I
> > know about html entities and html enities converters like
> > http://www.w3clubs.com/htmlentities.php but when i apply such html
> > entity converter my results turn into:
> >
> > * vällkommen
> >
> > which is near what i want it to be, but still no caps and i want it
> > just to be
> >
> > * Vällkommen
> >
> >
> > could someone help me out with a quick solution?
> >
>
>
>
> --
> -
> Khi bàn luận nghiêm túc:
> 1) Lòng tự ái càng cao thì lòng tự trọng càng thấp.
> 2) "Tôi chưa thấy bao giờ" có nghĩa là kiến thức còn hạn hẹp.
> 3) "Đâu/ai mà chẳng thế" đồng nghĩa với sự đoán mò & vơ đũa cả nắm.
> /
> 
> Nguyễn Quốc Vinh
> 59/29 Duy Tân - Huế
> +84-975001226
> +84-988433498




-- 
Yılmaz Uğurlu ~ jabber : [EMAIL PROTECTED]  ~ http://www.2nci.com ~ İzmir


[jQuery] Re: [PLUGIN] jQuery Chart

2007-12-12 Thread Shawn

Any idea how they do the "lines" in the line graphs?  The sloping lines 
that is

Is that simply small 1px divs positioned along the line?  Or is there 
another trick there?

Shawn


Rey Bango wrote:
> 
> Found this one today on DZone and it's been around for awhile. Surprised 
> I missed it. Very good stuff.
> 
> jQuery Chart
> 
> http://www.reach1to1.com/sandbox/jquery/jqchart/
> 
> Rey...


[jQuery] Re: printing ajax-retrieved content

2007-12-12 Thread jleijenaar

you should add a stylesheet for printing in which you hide all content
but the < dl > element:




[jQuery] Re: Performance of jquery

2007-12-12 Thread Yılmaz Uğurlu
I'm using Jquery, i really like it and its plugins. Also i don't like other
libraries. For example i'm using symfony framework for web application
development. But i'm not using internal javascript helpers of symfony.
Because they are prototype and script.aculo.us and i don't like them. I'm
also web application team director and my all team using Jquery and they
love it. The test results, whatever it said, my big winner is Jquery.
Because i'm good with Jquery and i love this syntax:

$("a")
   .filter(".clickme")
 .click(function(){
   alert("You are now leaving the site.");
 })
   .end()
   .filter(".hideme")
 .click(function(){
   $(this).hide();
   return false;
 })
   .end();

I think it's very cool :-)

The winner is Jquery.
2007/12/12, Rick Faircloth <[EMAIL PROTECTED]>:
>
>
> Thanks, Rey...
>
> It seems to me, anyway, that debating over one tool or another
> being a tenth of a second faster than another is kinda ridiculous.
>
> I've seen way too many sites that don't properly optimize images
> and end up with a 400 KB image trying to download that could easily
> be optimized to 20 KB and maintain image quality...  figure up the
> difference in performance speed of handling a 400 KB image vs a 20 KB
> image and then you've got a *real* issue on your hands.
>
> Rick
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Rey Bango
> > Sent: Tuesday, December 11, 2007 5:02 PM
> > To: jquery-en@googlegroups.com
> > Subject: [jQuery] Re: Performance of jquery
> >
> >
> > Hi Rick,
> >
> > Every so often, someone just mysteriously posts a message almost exactly
> > like the one that you saw today and it's usually a brand new user to the
> > list. It's been happening on a frequent basis and is assuredly link
> bait.
> >
> > So I want you to trust my judgment that when I say it's spam/link bait
> > it truly is. I would never censor any thread and would only request this
> > if I truly felt that it was someone trolling the list.
> >
> > Rey...
> >
> > Rick Faircloth wrote:
> > > Sorry, Rey, but I just wanted to understand the issue.
> > >
> > > It seems like jQuery comes out the winner in the tests
> > > that are run, but from everyone's response, I would expect
> > > the results to be the opposite.
> > >
> > > Am I missing something?
> > >
> > > Rick
>
>
>


-- 
Yılmaz Uğurlu ~ jabber : [EMAIL PROTECTED]  ~ http://www.2nci.com ~ İzmir


[jQuery] Re: dragging elements out of an area

2007-12-12 Thread Richard D. Worth
You want a hit test. This will compare the position of two rectangles (in
your case) and say whether they overlap or not. Here's a simple one:

// given two rectangles: r1, r2
// x1, y1 is upper-left corner; x2, y2 is lower-right
var hit = ( !(r1.x1 > r2.x2 || r1.x2 < r2.x1 || r1.y1 > r2.y2 || r1.y2 <
r2.y1) );

- Richard

On Dec 11, 2007 6:03 AM, Siemen Baader <[EMAIL PROTECTED]> wrote:

>
> Hi group,
>
> is there a way to detect if a draggable element is outside a given DOM
> object when released? I have some markers (divs) on a picture that I
> want to remove when they are dragged off the picture..
>
> I've tried to search the list and on google, but I probably can't come
> up with the right keywords for it... 'element inside' and similar give
> me hits about the structure of the DOM, not the visual appearence of
> the elements.
>
> tx,
> Siemen
>


[jQuery] Re: $.get and $.ajaxSetup

2007-12-12 Thread Jörn Zaefferer


Dado schrieb:

$.get does not seem to comply to the defaults set with $.ajaxSetup. Is
this a bug or a feature? Alternatively, I would like to have
customized $.ajax calls ala $.getJSON. For example, something like
$.getJSONPwithBasicAuth(url, data, callback, username, password) and
have datatype default to 'jsonp' and request headers automagically
setup for basic auth.

How would I go about defining my own customized $.get ajax functions?

Thanx in advance for your precious help!
  
Just take a look at jQuery's source code at the get implementation. 
http://dev.jquery.com/browser/trunk/jquery/src/ajax.js#L96


So basically its no more then this:

$.myUberGet = function(url, data, callback, username, password) {
   return $.ajax({
// your set of options
   });
}

Jörn


[jQuery] Re: Returning a new collection from a method

2007-12-12 Thread Wizzud

Simply return your new collection. How you get your new collection
from the current object may well involve map(), but however you do it,
all you need to do is return whatever collection you want to continue
the chain with. It is probably advisable to use pushStack(), so that
your original collection can be retrieved further along the 'chain' if
desired (by using end()).

eg.

$.fn.myMethod = function() {
return this.pushStack( this.map(function(i,elem) {
//
// return newElement
//
  }) );
};

or

$.fn.myMethod = function() {
var returnObject = [];
this.each(function() {
// var newElement = something based on 'this'
// returnObject.push(newElement);
  });
return this.pushStack(returnObject);
};

or variations thereof.

On Dec 12, 3:01 am, McLars <[EMAIL PROTECTED]> wrote:
> I have a plugin that needs to return a different jQuery collection
> than the one it was passed. In other words, each of the elements
> passed in the original collection will create a new element, and I
> want to return the new elements instead of the originals.
>
> So, instead of something like this:
>
> $.fn.myMethod = function() {
> return this.each(function() {
> //
> // Create new element here
> //
>
> });
>
> which returns the original element collection (preserves chaining),
> I'm looking for an elegant way to return the new elements in a jQuery
> collection.
>
> I think maybe the $.map method might be part of the solution, but I'm
> afraid I just can't understand how. Any help would be appreciated.
>
> Thanks,
>
> Larry


[jQuery] Re: ui.datepicker causes IE "operation aborted"

2007-12-12 Thread R. Rajesh Jeba Anbiah

On Dec 12, 12:29 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> On 8 Dez., 23:26, Charles Johnson <[EMAIL PROTECTED]> wrote:
   
> I had a similiar problem when using the ready event with scripts at
> the bottom of the page - in that case the ready event isn't necessary
> and I just forgot to remove it. After removal the error in IE was
> gone.
  

   For the sake of record, this wasn't the case with mine. I used
iframe.

--
  
Email: rrjanbiah-at-Y!comBlog: http://rajeshanbiah.blogspot.com/


[jQuery] Re: Performance of jquery

2007-12-12 Thread Martin Möller

On Dec 12, 2007 10:44 AM, Suni <[EMAIL PROTECTED]> wrote:
>
> What I find disturbing is that it was when ui.jquery.com first
> launched when people already brought this up, since the frontpage
> loaded so slowly, yet it has not been fixed - a job that would require
> maybe less than a minute to do.
>

I resized it and saved it as JPG, to whom do i need to email it? :)


[jQuery] Re: Performance of jquery

2007-12-12 Thread Suni

On 12 joulu, 05:02, "Rick Faircloth" <[EMAIL PROTECTED]> wrote:
> I've seen way too many sites that don't properly optimize images
> and end up with a 400 KB image trying to download that could easily
> be optimized to 20 KB and maintain image quality...  figure up the
> difference in performance speed of handling a 400 KB image vs a 20 KB
> image and then you've got a *real* issue on your hands.

I'm rather sad that the first example of such blatant deoptimization I
could think of was and is ui.jquery.com

The frontpage displays the black example image on the right hand side
(shown in 400x252 px). Too bad the image is actually a 982x622 PNG (!)
image of 441 kB!

For the life of me I cannot think of the reasoning for this. The image
drops from 441kB to about 23kB when resampled to the correct size and
saved as jpg, and the quality actually improves since it's correctly
resampled and not just resized with the browser's simple algorithm.

What I find disturbing is that it was when ui.jquery.com first
launched when people already brought this up, since the frontpage
loaded so slowly, yet it has not been fixed - a job that would require
maybe less than a minute to do.


[jQuery] Re: Performance of jquery

2007-12-12 Thread Olmo Maldonado

This is possible. We get trolls all the time on our forums.

I'd like to point out, however, that all the other links that you guys
referred him to have old performance results. We didn't advertise it,
but since the release of 1.2b we updated the Slickspeed to reflect
1.2b.

All the claims that MooTools was biased against IE have practically
been removed :P

We're still a bit slower than jQuery in IE, but like Rick Faircloth
said it's a small margin now. :D

Cheers,
-Olmo Maldonado
A MooTools Developer

On Dec 11, 2:02 pm, Rey Bango <[EMAIL PROTECTED]> wrote:
> Hi Rick,
>
> Every so often, someone just mysteriously posts a message almost exactly
> like the one that you saw today and it's usually a brand new user to the
> list. It's been happening on a frequent basis and is assuredly link bait.
>
> So I want you to trust my judgment that when I say it's spam/link bait
> it truly is. I would never censor any thread and would only request this
> if I truly felt that it was someone trolling the list.
>
> Rey...
>
> Rick Faircloth wrote:
> > Sorry, Rey, but I just wanted to understand the issue.
>
> > It seems like jQuery comes out the winner in the tests
> > that are run, but from everyone's response, I would expect
> > the results to be the opposite.
>
> > Am I missing something?
>
> > Rick