[jQuery] Re: - Where's the list of options?

2008-11-17 Thread invincible_virus

which documentation/plug-in are u talking about?


[jQuery] Possible to use a non ID selector in .load()?

2008-11-17 Thread Geuis

I'm loading a full page using .load() and trying to use a selector to
only get part of the page, however it doesn't seem to be working. Is
it necessary that the selector always start with an id?

My code:

$('#mydiv').load('/path/index.php body>center>table>tbody>tr:eq(2)
>td>table>tbody>tr');

Examples I've seen:

$('#mydiv').load('/path/index.php #container>table');



[jQuery] show/hide/toggle: suggestion to reduce show/hide code

2008-11-17 Thread Dylan Verheul

I'm building a new version of an often used data entry form on our
site Waarneming.nl (int'l version Observado.org).
It struck me that I often have to write something like this:

if (cond) $(this).show() else $(this).hide();

Since jQuery is about reducing and chaining, wouldn't it be nice if I
could write it like this:

$(this).toggle(cond); // shows if cond evaluates to true, else hides

Of course a new function showhide could be made for this, but toggle
seems a likely candidate for overloading.

-Dylan


[jQuery] Re: Autocomplete plug-in: Changing form action url?

2008-11-17 Thread Ryan

Original subject was supposed to have autocomplete in it, because it's
specific to that plugin.

On Nov 17, 3:45 pm, Ryan <[EMAIL PROTECTED]> wrote:
> I've got the autocomplete working, but when I hit submit (or enter),
> the action attribute of the from is made empty.
>
> Example:
> I've got a form with action="URL?opt=search"
>
> '$("#remote-search").autocomplete("URL?opt=autofill"}
>
> If I don't select anything from the autocomplete list, the form gets
> submitted to the proper location (opt=search).
>
> When I do select something from the autocomplete list, the form gets
> submitted to URL (opt is not set at all).
>
> I've even tried setting the "action" manually when submit button is
> selected, but no go.
>
> Any ideas?


[jQuery] [validate] My form isn't playing nicely. Any help would be great!

2008-11-17 Thread Josh Gillies

Hey all,

As the title of this thread suggests I am having some troubles with
the validation jQuery plugin.

Here's the code I am using:

http://code.jquery.com/jquery-latest.js";>
http://dev.jquery.com/view/trunk/
plugins/validate/lib/jquery.delegate.js">
http://dev.jquery.com/view/trunk/
plugins/validate/jquery.validate.js">

$(document).ready(function(){
$("#form_email_38366").validate({
rules: {
q38373_q3: "required"
},
q38373_q6: {
required: "#q38373_q5_0:checked, 
#q38373_q5_1:checked"
},
});
$("#q38373_q2_0, #q38373_q2_1, #q38373_q2_2").click(function() {
alert("hello" + $("#q38373_q3").valid());
});
$("#q38373_q5_0, #q38373_q5_1").click(function() {
alert("hello");
$("#q38373_q6").valid();
});
});


label { font-family: Arial, Helvetica, sans-serif; font-size: small; }
br { clear: both; }
input { border: 1px solid black;  }
label.error {
display:none;
background: red;
padding-left: 16px;
margin-left: .3em;
}
label.valid {
background: green;
display: block;
width: 16px;
height: 16px;
}



 1 -
Poor 2 - Below Average 3 - Average 4 - Good 5 -Very Good

If your response was 1 or 2 - Please Explain

 1 -
Poor 2 - Below Average 3 - Average 4 -
Good 5 - Very Good

If your response was 1 or 2, Please explain

 


I am linking off to the external files for now just for testing
purpose's, as I do not have complete access to the server I am using
just now.
Otherwise I would of uploaded the files and linked to them
accordingly.

Any help would be greatly appreciated! :)

Regards,

J Gillies





[jQuery] [ANNOUNCE] jQuery Validation credit card validation extension

2008-11-17 Thread Jack Killpatrick





Hi All,

We've (my company) released a new credit card validation extension
for the jQuery Validation plugin. It allows you to pass in the type of
credit card being used, which therefore allows the validation routine
to provide a more thorough validation. The prefix and length of the
card number are checked against an array of card data. A mod-10 (Luhn
algorithm) check is performed on the card number (as in the Validation
plugin's core creditcard validator). Dashes and spaces in the card
number are allowed.

We created this extension after discovering that the core creditcard
validation routine allows some card numbers to pass through that are
actually invalid (see the examples we posted). Since our solution lead
to reliance on passing in specific card names, it seemed like an
extension was the way to go (rather than a mod of the core creditcard
validation function).

Info, examples, documentation and download links are available in the
Labs area of our site:


http://www.ihwy.com/Labs/jquery-validate-credit-card-extension.aspx

This should help tighten up CC validation if you're using jQuery
Validation plugin already. We're using this on a network of retail
storefronts and so far so good, but if anyone spots anything screwy,
please let me know.

Happy validating! Validate on! I'd validate that. What's the valid
reason for that? Feeling validated? Validictorian?

- Jack

twitter: http://twitter.com/ihwy_jack






[jQuery] Re: FCKEditor plugin stopped working in Firefox 3.0.4

2008-11-17 Thread George

It does load. and seems to be working although the Ajax submission
does not do anything.
But there is a note
"Ajax Submission (DIV). This type of submission would not work without
this plugin."

So i thought plugin is not there so it's not working...

George.


On Nov 17, 9:29 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
> Hmm. In my case the FCK editor won't load. In the case of the link below the 
> ajaxSubmit test doesn't work for me.
> Both work for you on that page?
> Thx,
> Jack
> George wrote:Works for me... I have FF 3.0.4 George.. On Nov 17, 7:41 pm, 
> Jack Killpatrick<[EMAIL PROTECTED]>wrote:I found the other day that the 
> FCKEditor plugin:http://www.fyneworks.com/jquery/FCKEditor/doesn't work with 
> Firefox 3.0.4. I'm looking into it now, but maybe someone already knows why? 
> I suspect it has something to do with the way it hooks into the ajaxSubmit 
> function of the jQuery Form plugin. TIA, Jack


[jQuery] Previous TD

2008-11-17 Thread Randy Johnson

Hello,

Here is sample code:



34 Days
11/03/2008




When I click on the date above I want to be able to change the rowSpan
on the td that surrounds it.  I cannot seem to get it right.

Here is  the latest thing I tried:

$("#r"+id).prev("td").attr("rowSpan","1");

I also tried:

$("#r"+id).prev(".rsp2 td").attr("rowSpan","1");

Thanks!

Randy


[jQuery] Re: How do I reset to the original positions of a sortable list? (using the .sortable() method)

2008-11-17 Thread kgosser

Bumpity bump. Any tips? Thanks in advance!

On Nov 14, 3:57 pm, kgosser <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> I'm using this sortable method:http://docs.jquery.com/UI/Sortables/sortable
>
> Works perfect! I have one question though: When a certain action is
> taken by the user, I want to reset the original order of the s in
> the list. I can't seem to figure out how to do that. Does anyone have
> any tips?
>
> Thanks!


[jQuery] it is possible to have a dynamic class?

2008-11-17 Thread sglai

hi,

Like to have a class that has different methods (prototype) base on
its arguments.
Is that possible in javascript?


Thanks


[jQuery] Re: Convert from mootools to jquery

2008-11-17 Thread ricardobeat
Is there a sample page somewhere?

On Nov 16, 10:18 pm, gus <[EMAIL PROTECTED]> wrote:
> Hi i want to know if this code can be converted to jquery. It's a very
> good hoover pop up with effect code.
>
> function initCloseButton(){
>         var blocks = document.getElementsByTagName("li");
>         for (var i=0; i                 if (blocks[i].className.indexOf("roll") != -1){
>                         if ( blocks[i].className.indexOf("close") == -1 ) 
> blocks
> [i].className += " close";
>                         var links = blocks[i].getElementsByTagName("a");
>                         for (var k=0; k                                 if (links[k].className == "button") {
>                                         links[k].onclick = function()   {
>                                                 if ( 
> this.parentNode.className.indexOf("close") != -1 ){
>                                                         
> this.parentNode.className = this.parentNode.className.replace
> ("close", "");
>                                                 }
>                                                 else{
>                                                         
> this.parentNode.className += " close";
>                                                 }
>                                                 return false;
>                                         }
>                                 }
>                         }
>                 }
>         }}
>
> var _timer;
> function initMSDropDown(){
>         $$('.home-page .top-block ul li').each(function(el, i){
>                 if ($(el).getElement('.sub-nav')){
>                         el._div = $(el).getElement('.sub-nav');
>                         el._h = $(el._div).getStyle('height').toInt();
>                         el._w = $(el._div).getStyle('width').toInt();
>                         el._i = i;
>                         $(el._div).setStyle('height', 0);
>                         $(el._div).setStyle('width', 0);
>                         el.onmouseover = function(){
>                                 if (_timer) clearTimeout(_timer);
>                                 startEffect(this);
>                         }
>                         el.onmouseout = function(){
>                                 _timer = setTimeout("disposeDivs()", 100);
>                         }
>                 }
>
>         });
>         disposeDivs();}
>
> function startEffect(elem){
>         if ($$('.sub-nav').length){
>                 $$('.sub-nav').each(function(des, i){
>                         $(des).setStyle('visibility', 'visible');
>                 });
>                 return;
>         }
>         if (elem._div){
>                 var _border = new Element('div', {'class': 'sub-nav', 
> 'styles':{
>                         'border':'1px solid #B8B8B8',
>                         'background':'none',
>                         'height': '15px',
>                         'width': '5px',
>                         'right': 0,
>                         'visibility': 'visible'
>                 }}).inject(elem);
>                 _border.moo = new Fx.Morph($(_border), {duration:100,
>                         onComplete: function(){
>                                 
> $(elem._div).getElements('*').setStyle('opacity', 1);
>                                 _border.innerHTML = elem._div.innerHTML;
>                                 $(_border).setStyle('background', '#FF');
>                         }
>                 });
>                 _border.moo.start({'height': elem._h, 'width': elem._w});
>         }}
>
> function disposeDivs(){
>         $$('.sub-nav').each(function(des, i){
>                 $(des).getElements('*').setStyle('opacity', 0);
>                 $(des).setStyle('background', 'none');
>                 des.moo = new Fx.Morph($(des), {duration:100,
>                         onComplete: function(){
>                                 $(des).dispose();
>                         }
>                 });
>                 des.moo.start({'height': 15, 'width': 5});
>         });}
>
> function initPage(){
>         initCloseButton();
>         initMSDropDown();}
>
> if (window.addEventListener){
>         window.addEventListener("load", initPage, false);}
>
> else if (window.attachEvent){
>         window.attachEvent("onload", initPage);
>
> }

[jQuery] Re: [autocomplete] where did the doc go?

2008-11-17 Thread thierry

Yes exactly... can't believe I didn't see it. Thank you Jorn.

On Nov 15, 5:37 am, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> You're looking for this, 
> right?http://docs.jquery.com/Plugins/Autocomplete/autocomplete#url_or_datao...
>
> Jörn
>
> On Sat, Nov 15, 2008 at 3:49 AM, thierry <[EMAIL PROTECTED]> wrote:
>
> > Hey guys,
>
> > I hope it's just I can't find it anymore, but where's the (complete)
> >docon autocomplete? The plugin page on jQuery seems pretty light
> > (http://docs.jquery.com/Plugins/Autocomplete), and the official page
> > redirects to this new jQuery page.
>
> > If I remember correctly, there was a list of all options available in
> > autocomplete(url, [options])...
>
> > Mostly, I was looking for an option so when the user hits 'enter',
> > autocomplete plugin would not automatically selects by default a
> > suggestion, but would submit exactly what was entered. Any idea on how
> > to do this?
>
> > Thanks for your help!


[jQuery] Re: FCKEditor plugin stopped working in Firefox 3.0.4

2008-11-17 Thread Jack Killpatrick





Hmm. In my case the FCK editor won't load. In the case of the link
below the ajaxSubmit test doesn't work for me.

Both work for you on that page?


Thx,
Jack

George wrote:

  Works for me... I have FF 3.0.4

George..

On Nov 17, 7:41 pm, Jack Killpatrick <[EMAIL PROTECTED]> wrote:
  
  
I found the other day that the FCKEditor plugin:

http://www.fyneworks.com/jquery/FCKEditor/

doesn't work with Firefox 3.0.4. I'm looking into it now, but maybe
someone already knows why? I suspect it has something to do with the way
it hooks into the ajaxSubmit function of the jQuery Form plugin.

TIA,
Jack

  
  
  







[jQuery] Re: strip out textarea 's HTML attribute

2008-11-17 Thread Richard D. Worth
As shown earlier by Hector. Here's another example:

var foo = $(""); // create an empty div element
foo.html("Hello"); // set the html
var html = foo.html(); // get the html

It's just in memory, all disconnected from the DOM, as it was never appended
to the body or any other element in the document. You can also do fun things
like

var strong = $("strong", foo); // find strong elements within the context of
the (in this case) disconnected DOM Element foo, instead of the default
context, the current document

- Richard

On Mon, Nov 17, 2008 at 6:27 PM, cc96ai <[EMAIL PROTECTED]> wrote:

>
> if div foo is outside the DOM, how could we use jQuery to assign the
> HTML into it ? and retrieve it back ?
>
> On Nov 17, 1:51 pm, "Hector Virgen" <[EMAIL PROTECTED]> wrote:
> > The div will only be part of the body if you append it to the body.
> > var div = document.createElement('div'); // not part of the dom yet
> > div.setAttribute('id', 'foo'); // set an id, but it's still not part of
> the
> > dom
> > document.body.appendChild(div); // now the div is part of the dom
> >
> > But I'm not sure how  tags are handled prior to dom insertion.
> >
> > -Hector
> >
> > On Mon, Nov 17, 2008 at 1:45 PM, cc96ai <[EMAIL PROTECTED]>
> wrote:
> >
> > > how could I create the DIV outside the DOM ?
> > > if I create a 
inside the , it is part of the DOM, isn't > > > it ? > > > > > On Nov 17, 12:32 pm, "Hector Virgen" <[EMAIL PROTECTED]> wrote: > > > > Will javascript be executed by jQuery#html() if the container is not > part > > > of > > > > the dom? > > > > -Hector > > > > > > On Mon, Nov 17, 2008 at 12:21 PM, cc96ai <[EMAIL PROTECTED]> > > > wrote: > > > > > > > That is my original design, however if the textarea contains the > > > > > javascript, it will execute the Javascript in div as well. > > > > > > > in the following example, the popup will come out when we try to > > > > > populate the textarea content into div. > > > > > that's why I am looking other way to parse the content. > > > > > e.g. > > > > >