[jQuery] Scrolling problem

2009-08-14 Thread Kevin

I managed to get the scrolling to kinda work – if I set it up with
static LI then I can get the scrolling to work the way I want it to,
sans being able to pass the number of the image I want to be shown
(unless I put it in the text field of the anchor tag, which shows with
the image) but I have no way of passing the other variables to call my
updating button. Also, using the static it takes much longer to load
the page.

I’m looking to be able to set a variable – like NewStrt – to be the
first image in the carousel by calling a simple function such as
ScrollTo(NewStrt) or mycarousel.ScrollTo(NewStrt). Using the “function
mycarousel_initCallback(carousel)” scrolling function doesn’t work
with dynamic loading, and I can’t pass my variables with static
loading. Please help.

If you would like to see what I'm doing to get a better idea, you can
see it here (along with my current code):

http://ssbbs.dyndns.org/panic/rpicts.asp

Thanks in advance for any assistance with this.

Kevin



[jQuery] Re: Dealing with errors when .find() on .ajax()

2009-08-14 Thread comslash.com

I don't think you can ignore this error ... It looks like you are
returning a JSON response, try turning data type to json and then
insert responseHTML.One into your find command ... as "One" is your
object ... see below.

$.ajax({
  url: 'http://www.examplepage.com',
   success: function(responseHTML) {
 var someText = $(responseHTML.One).find('#myDiv').html();
// you may need $('#'+responseHTML.One) ... if you are looking for
say an id ... or "." + ... if its a class
   },
 dataType: 'json'

 });


On Aug 14, 9:20 pm, nick  wrote:
> $.ajax({
>   url: 'http://www.examplepage.com',
>   success: function(responseHTML) {
>     var someText = $(responseHTML).find('#myDiv').html(); // This part
> returns a script error and aborts anything else from here
>   },
>   dataType: 'html'
>
> });
>
> The problem is that examplepage.com has a script error
>
> (Syntax error, unrecognized expression: {"One":"1")
>
> that is messing up anything that searches responseHTML. How can I
> ignore this error because all I need is a section of html that is not
> affected by the errant script.


[jQuery] Re: Can't get my head around this chain

2009-08-14 Thread mkmanning

@OP: From your example, it appears that the number you want is the
categoryid param in the anchor's href. If that's always the case, you
could save all the DOM traversing and just extract it from the anchor:

$('a:contains("Edit")').click(function(){
  var n = /categoryid=(\d+)&/.exec(this.href);
  n = (n && n.length>1)?n[1]:n; //null or index 1
  your_function(n);
});

You could make your selector easier if you could add a class to the
anchor, such as $('a.edit'); for that matter you could simplify the
extraction of the ID if you just make it an id on the anchor as well:
 (id's can't start with numbers):

this.id.replace('c','');

HTH

On Aug 14, 8:35 am, Laker Netman  wrote:
> Hi all. Here is a section of a page I generate:
> 
>         5029
>         1100
>         2
>         Products
>         Delete a>
>         New td>
>         Edit a>   
>         Move Up a>
>         Move
> Down
>         
>                         Move to...
>                 
>         
> 
>
> When I click on the "Edit" link in the 7th TD (or 6th for you zero-
> based folks :) I want to call a function and have 5029 available to
> use as a parameter to it. I really don't care which element or
> attribute I use to get the value (as it obviously appears in several
> places), whichever is easiest. I'm thinking the 1st TD, either the "a"
> name attribute or text.
>
> I just can't seem to put together a chain of selectors together that
> gets me what I want.
>
> Can someone help?
>
> TIA,
> Laker


[jQuery] JQuery Tablesorter - Multiple Options

2009-08-14 Thread John F

Just a quick question. I'm trying to combine mutliple tablesoter
options but I'm not able to combine the functions. I'm new to the
Jquery/Javascript arena and haven't been able to find any examples on
the web.

Part 1

Code:
$(document).ready(function()  {
   $("#draftlist").tablesorter({
  headers: {
 1: {sorter: false}
  }
   });
});

Part 2

Code:
$(document).ready(function() {
$("#draftlist").tablesorter();
   $("#RankAndHeight").click(function() {
var sorting = [[0,0],[2,0]];
   $("#draftlist").trigger("sorton",[sorting]);
  return false;
   });
});


I've attempted to use them separately in the same js file but it
caused an odd echo effect. I would click any column to sort and it
would perform the action twice as if I double clicked it.

Here was my merge attempt where neither effect worked:
Code:
$(document).ready(function()  {
   $("#draftlist").tablesorter({
  headers: {
 1: {sorter: false}
  }

$("#RankAndHeight").click(function() {
 var sorting = [[0,0],[2,0]];
 $("#draftlist").trigger("sorton",[sorting]);
 return false;
});
   });
});


Any ideas?


[jQuery] Superfish and cufon

2009-08-14 Thread NiJoMi

Is it possible to assign cufon to just the top level of the menu i.e;
toplevel cufon text replace sub menus standard fonts. I have tried
several methods but the sub menus inherit cufon


[jQuery] Re: Click() Not Working

2009-08-14 Thread James

Just to clarify that further, click() on a  doesn't perform a mouse
click on a link and follow through.
It calls the onclick event attached to the  elements, which you
don't have set, so it does nothing.


On Aug 14, 4:08 pm, "Richard D. Worth"  wrote:
> It doesn't work to call .click() on an A, if you want to navigate a link's
> href. Instead:
>
> window.location = $("td a.menu:contains('Main')").attr('href');
>
> - Richard
>
> On Fri, Aug 14, 2009 at 7:32 PM, S2  wrote:
>
> > http://www.w3.org/
> > TR/html4/strict.dtd">
> > 
> > 
> >   
> >   
> >   
> >   
> >   
> >      $(function(){
> >          $("td a.menu:contains('Main')").click();
> >      });
> >   
> > 
> > 
> >   
> >      
> >         
> >         
> >         
> >         
> >      
> >      
> >         
> >            Main
> >         
> >         
> >         
> >      
> >   
> > 
> > 
>
> > On Aug 13, 6:32 pm, Jules  wrote:
> > > $("td a.menu:contains('Main')").click() should work. Can you post the
> > > html?
>
> > > On Aug 14, 4:48 am, S2  wrote:
>
> > > > This doesn't work in IE or Firefox:
>
> > > > $("td a.menu:contains('Main')").click();
>
> > > > This works in IE:
>
> > > > $("td a.menu:contains('Main')")[0].click();
>
> > > > $("td a.menu:contains('Main')").length is 1
>
> > > > What am I doing wrong?
>
>


[jQuery] Re: Click() Not Working

2009-08-14 Thread Richard D. Worth
It doesn't work to call .click() on an A, if you want to navigate a link's
href. Instead:

window.location = $("td a.menu:contains('Main')").attr('href');

- Richard

On Fri, Aug 14, 2009 at 7:32 PM, S2  wrote:

>
> http://www.w3.org/
> TR/html4/strict.dtd">
> 
> 
>   
>   
>   
>   
>   
>  $(function(){
>  $("td a.menu:contains('Main')").click();
>  });
>   
> 
> 
>   
>  
> 
> 
> 
> 
>  
>  
> 
>Main
> 
> 
> 
>  
>   
> 
> 
>
> On Aug 13, 6:32 pm, Jules  wrote:
> > $("td a.menu:contains('Main')").click() should work. Can you post the
> > html?
> >
> > On Aug 14, 4:48 am, S2  wrote:
> >
> > > This doesn't work in IE or Firefox:
> >
> > > $("td a.menu:contains('Main')").click();
> >
> > > This works in IE:
> >
> > > $("td a.menu:contains('Main')")[0].click();
> >
> > > $("td a.menu:contains('Main')").length is 1
> >
> > > What am I doing wrong?
>


[jQuery] Re: Code inside click() event not firing.

2009-08-14 Thread Patrick

James, yes.  Dead on and I have it working now.

The event delegation/event bubbling proved difficult as the
event.target.id of the freshly loaded anchor tags didn't seem to be
available to me (needed for show()ing the corresponding div).

What did work was rebinding the event at the end of the ajax call
(within the function just after the return).  Luckily for me,
unbinding and binding didn't appear to be necessary.   At least if I
run into problems with it, I'll know where to look.

The help was much appreciated.  Thank you!

On Aug 13, 8:36 pm, James  wrote:
> Are the  tags that you're binding the click event to introduced
> into the DOM from the showHint AJAX request?
> If so, read this:
> Why do my events stop working after an AJAX 
> request?http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
>
> On Aug 13, 8:16 am, Patrick  wrote:
>
> > New to jQuery, I did many searches before posting.
>
> > This is happening in both IE6 and Firefox 3.0.13.  I've gotten the
> > following script to work under strange circumstances (explained below
> > first snippet).
>
> > jQuery(document).ready(function(){
> >     showHint("");  // ajax that fires onload, with no problem (but did
> > try taking it out with same results)
> >     $("a").click(function () {
> >         alert("hi onclick"); // stuck this in there but doesn't fire
> > either.
> >         var avid;
> >         avid = "#div" + $(this).attr("id");
> >         alert(avid); // this won't work either.
> >         $(avid).fadeIn("slow");
> >         $(avid).css({display: block}); // added this extra when fadeIn
> > didn't work.
> >     });
>
> > });
>
> > When I'm able to successfully get both the alert and the rest of the
> > script to work is when I add another alert in the ready() section.
> > Then, the code works for the rest of the browser session (even after
> > the 'ready ()' alert is removed).
>
> > jQuery(document).ready(function(){
> >     showHint("");  // ajax/json
> >     alert("hi on load"); // after inserting this, the below all works
> > **
> >     $("a").click(function () {
> >         alert("hi onclick"); // stuck this in there but doesn't fire.
> >         var avid;
> >         avid = $(this).attr("id");
> >         avid = "#div" + avid;
> >         alert(avid);
> >         $(avid).fadeIn("slow");
> >         $(avid).css({display: block}); // added this extra when fadeIn
> > didn't work.
> >     });
>
> > });
>
> > Any clue why this would be happening?
>
> > Thanks,
> > Pat.


[jQuery] Dealing with errors when .find() on .ajax()

2009-08-14 Thread nick

$.ajax({
  url: 'http://www.examplepage.com',
  success: function(responseHTML) {
var someText = $(responseHTML).find('#myDiv').html(); // This part
returns a script error and aborts anything else from here
  },
  dataType: 'html'
});

The problem is that examplepage.com has a script error

(Syntax error, unrecognized expression: {"One":"1")

that is messing up anything that searches responseHTML. How can I
ignore this error because all I need is a section of html that is not
affected by the errant script.


[jQuery] close ColorBox link?

2009-08-14 Thread KScott

Hello,

I'm wondering how I can close colorbox ( http://colorpowered.com/colorbox/
) from a link within the iframe window?



thanks in advance for your time!


[jQuery] Plugins and Ajax

2009-08-14 Thread Kilhom

Hi !

I use ajax to load a page, but when this page is loaded i cant use the
"beaty tips" plugin inside the loaded content, any idea ?

Thanks !


[jQuery] Jquery works in FF but not IE

2009-08-14 Thread Dan Cowley

The following code works fine in FF chrome etc but not IE, anyone know
why?

Basically everything works accept the replacement of the image
attribute

$("#container #main_image img#largeId").attr({ src: largePath });

Even the rest of the function ie the swapping classes works, just not
the image replacement. The full example can be seen here http://keith-ingham.com
click on an image and try and swap between the thumbnails on the right
in the modal window.

jQuery(document).ready(function($) {

$("a.group").fancybox({
  'frameWidth':966,
  'frameHeight': 547,
  'hideOnContentClick': false,
  'overlayOpacity': 0.85,
  'callbackOnShow': function() {
$("#container ul#thumbnails li a").click
(function(){
var largePath = $
(this).attr("title");
$("#container #main_image
img#largeId").fadeOut().hide
();
$("#container #main_image
img#largeId").attr({ src: largePath });
$("#container
#main_image img#largeId").fadeIn("slow");
$
('.active').removeClass('active');
$(this).addClass
("active");return false;
});
  }
 });


[jQuery] Jquery works in FF but not IE

2009-08-14 Thread Dan Cowley

The following code works fine in FF chrome etc but not IE, anyone know
why?

Basically everything works accept the replacement of the image
attribute

$("#container #main_image img#largeId").attr({ src: largePath });

Even the rest of the function ie the swapping classes works, just not
the image replacement. The full example can be seen here example click
on an image and try and swap between the thumbnails on the right in
the modal window.

jQuery(document).ready(function($) {

$("a.group").fancybox({
  'frameWidth':966,
  'frameHeight': 547,
  'hideOnContentClick': false,
  'overlayOpacity': 0.85,
  'callbackOnShow': function() {
$("#container ul#thumbnails li a").click
(function(){
var largePath = $
(this).attr("title");
$("#container #main_image
img#largeId").fadeOut().hide
();
$("#container #main_image
img#largeId").attr({ src: largePath });
$("#container
#main_image img#largeId").fadeIn("slow");
$
('.active').removeClass('active');
$(this).addClass
("active");return false;
});
  }
 });


[jQuery] Re: Click() Not Working

2009-08-14 Thread S2

http://www.w3.org/
TR/html4/strict.dtd">


   
   
   
   
   
  $(function(){
  $("td a.menu:contains('Main')").click();
  });
   


   
  
 
 
 
 
  
  
 
Main
 
 
 
  
   



On Aug 13, 6:32 pm, Jules  wrote:
> $("td a.menu:contains('Main')").click() should work. Can you post the
> html?
>
> On Aug 14, 4:48 am, S2  wrote:
>
> > This doesn't work in IE or Firefox:
>
> > $("td a.menu:contains('Main')").click();
>
> > This works in IE:
>
> > $("td a.menu:contains('Main')")[0].click();
>
> > $("td a.menu:contains('Main')").length is 1
>
> > What am I doing wrong?


[jQuery] Re: Cycle Plugin - Changing the options of the cycle

2009-08-14 Thread Z-Ender

My solution was to show/hide one of 2 cycles, depending on which one i
needed, using .css('display', 'none') and .fadeIn.  Once it was hidden
i stopped the cycle i hide and use .fadeIn to show the one i want.
Then it is started.  Both cycles use the same pager, next, and prev
options.

 The pager only works 100% on the initial document.ready creation of
the cycle.  After switching to another cycle the indicators are the
only thing that work.  The indicators might not work if the cycles
don't have the same number of elements.  They aren't part of the start
for .click event of my cycle selection.

On Aug 14, 9:24 am, Z-Ender  wrote:
> I define a cycle in document.ready as per usual.  In my cycle I have
> different sets of images that i want to cycle through and only want
> certain ones to cycle as selected using the slideExpr option.  Is
> there a way to change this option from:
> slideExpr: 'a'
> to:
> slideExpr: 'b'
>
> another alternative i've considered is to make a cycle of cycles.
> Does anyone have an example of that?


[jQuery] Re: Convert JavaScript object to JSON

2009-08-14 Thread James

Yes, currently using JSON.stringify is the only way to do it. Sending
JSON (as a string) back to the server is not so common so I believe
that's why it's not implemented. Less bloat in the library.

On Aug 14, 12:17 pm, rickoshay  wrote:
> In addition to fetching JSON you might want to POST it back to the
> server, but there is no postJSON method. You cannot use the generic
> ajax method, either. What is missing is the complement of "eval" to
> turn a JavaScript object in to JSON. The JSON.stringify function 
> fromwww.json.org(see json2.js in JavaScript section) does the trick, but
> it would be nice if jQuery incorporated that out of the box, to save
> some hunting time.
>
> Using the jquery ajax method to set the "type" to "json" and the
> "content-type" to "application/json" send and recieve JSON, but you
> must use JSON.stringify to convert your outgoing object to JSON.
>
> P.S.. a lot of forgiving parsers have resulted in a lot of articles on
> JSON being wrong. would I like to mention that here. Property names
> are JSON strings. JSON strings have double quotes. Therefore, property
> names have to be surrounded with double quotes. Single quotes are not
> JSON strings and not legal (JSON is not JavaScript).
>
> INVALID: { foo : "bar" }
> INVALID: { 'foo' : "bar" }
>
> VALID: { "foo" : "bar" }
>
> VALID: { "foo" : true, "bar" : 98.6, "baz" : [ 1, 2, 3 ], "waldo" :
> { "cheese" : "blue" }  }
>
> http://www.json.org
>
> http://www.jsonlint.com/


[jQuery] Re: Change the contents of a div after it has been created

2009-08-14 Thread Benn

I tried changing the HTML/Javascript to this:

$("#select option").each(function(){
var value = $(this).html();
$(this).addClass(value);
$('.foo').append('');
});
$('.foo a img').click(function(event){
event.preventDefault();
var fAlt = $('.foo a img').attr('alt');
$('.fooAlt').text(fAlt)
})


1 test
2 test
3 test






And it is still not working: I am filling the div with a select menu:
is that the problem?


[jQuery] Convert JavaScript object to JSON

2009-08-14 Thread rickoshay

In addition to fetching JSON you might want to POST it back to the
server, but there is no postJSON method. You cannot use the generic
ajax method, either. What is missing is the complement of "eval" to
turn a JavaScript object in to JSON. The JSON.stringify function from
www.json.org (see json2.js in JavaScript section) does the trick, but
it would be nice if jQuery incorporated that out of the box, to save
some hunting time.

Using the jquery ajax method to set the "type" to "json" and the
"content-type" to "application/json" send and recieve JSON, but you
must use JSON.stringify to convert your outgoing object to JSON.

P.S.. a lot of forgiving parsers have resulted in a lot of articles on
JSON being wrong. would I like to mention that here. Property names
are JSON strings. JSON strings have double quotes. Therefore, property
names have to be surrounded with double quotes. Single quotes are not
JSON strings and not legal (JSON is not JavaScript).

INVALID: { foo : "bar" }
INVALID: { 'foo' : "bar" }

VALID: { "foo" : "bar" }

VALID: { "foo" : true, "bar" : 98.6, "baz" : [ 1, 2, 3 ], "waldo" :
{ "cheese" : "blue" }  }

http://www.json.org

http://www.jsonlint.com/


[jQuery] Re: Add element after closing tag of another.

2009-08-14 Thread James

For your first question, you can use wrap().
http://docs.jquery.com/Manipulation/wrap

For your second question, if you didn't know, and ID must begin with a
letter, not a number.
With that in mind, you can do something like:

var counter = 1;
$("span").each(function() {
this.id = 'id_'+counter;
counter++;
});

This will make ID's for each span (from top to document first) like
"id_1", "id_2", etc.

To retrieve an ID like that, you can do:
$("span").click(function() {
   var id = this.id.split('_')[1];  // 1, 2, 3...
   alert(id);
});

On Aug 14, 9:01 am, Breno Gazzola  wrote:
> Hello everyone, I just started using jquery and I'm having some
> difficulty figuring out how to do two things.
>
> First, how do I get this:
> Hello
> To become this?
> Hello
> I know how to do $("b").before("span"), but $("/b").after("span") is
> not working.
>
> Second, how do I get this:
> Hello
> Hello
> To become this?
> Hello
> Hello
> I tried using a counter and replaceWith(), but this method returns a
> DOM not an jquery element so .attr(counter) wont work.


[jQuery] Re: Change the contents of a div after it has been created

2009-08-14 Thread Mauricio (Maujor) Samy Silva
var fAlt = $('.foo').attr('alt');

should be:

var fAlt = $('.foo a img').attr('alt');

or better

var fAlt = $(this).attr('alt');

Maurício
  -Mensagem Original- 
  De: Benn 
  Para: jQuery (English) 
  Enviada em: sexta-feira, 14 de agosto de 2009 18:37
  Assunto: [jQuery] Re: Change the contents of a div after it has been created
  missed a line, the JS should be:
  $('.foo').append('');
  $('.foo a img').click(function(event){
  event.preventDefault();
  var fAlt = $('.foo').attr('alt');
  $('.fooAlt').text(fAlt)
  })

  ...

[jQuery] Re: Change the contents of a div after it has been created

2009-08-14 Thread Benn

missed a line, the JS should be:

$('.foo').append('');
$('.foo a img').click(function(event){
event.preventDefault();
var fAlt = $('.foo').attr('alt');
$('.fooAlt').text(fAlt)
})

On Aug 14, 2:30 pm, Benn  wrote:
> I'm trying (rather unsuccessfully) to fill a div that was created by
> jquery. I feel like the code should work: any hints or solutions?
>
> Here's my html:
> 
> 
> 
> 
>
> Here's my javascript:
> $(document).ready(function(){
> $('.foo').append('');
> $('.foo a img').click(function(event){
>                 event.preventDefault();
>                 $('.foo').attr('alt');
>         })
>
> });


[jQuery] Re: Merging two jQuery collections

2009-08-14 Thread Hector Virgen
Oh, that makes sense. Thanks!

--
Hector


On Fri, Aug 14, 2009 at 2:13 PM, Ricardo  wrote:

>
> .add() returns the merged collections, but it doesn't change 'foo'.
> you have to reassign it:
>
> foo = foo.add(foobars);
>
> On Aug 14, 2:36 pm, Hector Virgen  wrote:
> > Hello,
> > I have two jQuery collections that I'd like to merge into one:
> >
> > var foo = $('#foo');
> > var foobars = foo.nextAll('.bar');
> >
> > I've tried using $.add() to combine the two, but it doesn't seem to be
> > working:
> >
> > foo.add(foobars);
> > foo.css('border', '2px solid #f00'); // only #foo is affected
> >
> > I've confirmed that foo and foobars both contain elements by checking the
> > length property. Is there a way to merge two or more collections into
> one?
> >
> > I cannot make changes to the HTML, so wrapping them in a container div is
> > not an option.
> >
> > Thanks in advance for the help!
> >
> > --
> > Hector
>


[jQuery] Change the contents of a div after it has been created

2009-08-14 Thread Benn

I'm trying (rather unsuccessfully) to fill a div that was created by
jquery. I feel like the code should work: any hints or solutions?

Here's my html:





Here's my javascript:
$(document).ready(function(){
$('.foo').append('');
$('.foo a img').click(function(event){
event.preventDefault();
$('.foo').attr('alt');
})
});


[jQuery] Re: Cycle Plugin - Changing the options of the cycle

2009-08-14 Thread Z-Ender

Also maybe I don't understand what slideExpr does but I thought it
didn't look at child elements.
I've set it to slideExpr: "div"
and i have nested div tags.
ex

  
   


  
  

this renders as 4 slides when i set slideExpr.  Is this expected
behavior?
I think what i really need would a classExpr.


On Aug 14, 11:45 am, Mike Alsup  wrote:
> > I define a cycle in document.ready as per usual.  In my cycle I have
> > different sets of images that i want to cycle through and only want
> > certain ones to cycle as selected using the slideExpr option.  Is
> > there a way to change this option from:
> > slideExpr: 'a'
> > to:
> > slideExpr: 'b'
>
> Nope. But you could stop and then restart the slideshow with a diff
> slideExpr.


[jQuery] Re: Merging two jQuery collections

2009-08-14 Thread Ricardo

.add() returns the merged collections, but it doesn't change 'foo'.
you have to reassign it:

foo = foo.add(foobars);

On Aug 14, 2:36 pm, Hector Virgen  wrote:
> Hello,
> I have two jQuery collections that I'd like to merge into one:
>
> var foo = $('#foo');
> var foobars = foo.nextAll('.bar');
>
> I've tried using $.add() to combine the two, but it doesn't seem to be
> working:
>
> foo.add(foobars);
> foo.css('border', '2px solid #f00'); // only #foo is affected
>
> I've confirmed that foo and foobars both contain elements by checking the
> length property. Is there a way to merge two or more collections into one?
>
> I cannot make changes to the HTML, so wrapping them in a container div is
> not an option.
>
> Thanks in advance for the help!
>
> --
> Hector


[jQuery] Howto: Select a sub-list from a long list

2009-08-14 Thread lihao

I have a MySQL table with 90 columns and I want the users to be able
to select any columns they concern and output the result accordingly.
In the front-end, I can use a group of checkbox which looks very ugly
and I can not setup the orders for selected columns.

Is there a plug-in or some examples in jQuery, that I can make 2
parallel boxes (i.e. an original-box and a selected-box). the original-
box lists all of the column names at the beginning and there is a way
to move items between two boxes. And the order of items in the
selected-box can be adjusted. the items in the selected-box will be
used to build into an array in my backend code.

I remember I've read some similar discussions here last year, just can
not find it again. thanks and have a good weekend,

lihao


[jQuery] Add element after closing tag of another.

2009-08-14 Thread Breno Gazzola

Hello everyone, I just started using jquery and I'm having some
difficulty figuring out how to do two things.

First, how do I get this:
Hello
To become this?
Hello
I know how to do $("b").before("span"), but $("/b").after("span") is
not working.

Second, how do I get this:
Hello
Hello
To become this?
Hello
Hello
I tried using a counter and replaceWith(), but this method returns a
DOM not an jquery element so .attr(counter) wont work.


[jQuery] Need to scroll inside of a by clicking a button

2009-08-14 Thread webspee...@gmail.com

I'm trying to use jQuery and Flexigrid to display a table. Once the
table is displayed, I want to be able to use the page up/page down
keys to scroll down the table.

I've tried using offsetTop and offsetParent but it's not working. The
values are being set as expected, but the scrollbar isn't moving.

Here is the JS code


var inum = 1;
function scrollDown()
{
var bDiv = $('.bDiv');


//alert("Point: " + document.getElementById("point20").offsetTop +
"\n" +
//  "ID: " + document.getElementById("point20").className +
"\n" +
//  "jQ: " + $("#point20").attr("id"));


var j = 'point' + inum.toString();
var thepoint = document.getElementById(j).offsetParent;

if(inum <= 199 && inum >= 0)
{
alert("incrementing scrollTop");
bDiv.scrollTop = parseInt(inum) * 5;  //thepoint;
inum++;
}
alert("Height: " + bDiv.scrollHeight);
/**
alert("Top: " + bDiv.scrollTop + "\n" +
  " I: " + inum + "\n" +
  " J: " + j + "\n" +
  "Point: " + thepoint + "\n" +
  "Parent: " + bDiv.offsetParent + "\n" +
  "Parent2: " + thepoint.offsetParent);
  ***/
//if(i==6) i=1;
//alert("Span Value: " + j + " - " + $("#" + j).attr("id") + "\n"
+ " - POINT: " + thepoint);
//alert("Top: " + bDiv.scrollTop);
//alert("Scroll: " + bDiv.outerHeight(true) + " - " +
bDiv.innerHeight(true));
//bDiv.scrollBy(150,150)
}


Each row has a cell with the following:
  

I've been all over this code and can't figure out why it won't work,
outside of me doing something wrong. Maybe I just need to take a
break.

Any help would be GREATLY appreciated.


[jQuery] Re: plugin problem with jQuery 1.3.2

2009-08-14 Thread Karl Swedberg
The problem with the plugin is that it relies on "evaling" a string  
when it tries to create the new selectors -- :minmax, :max- 
height, :min-height, etc.

That's no longer allowed in jQuery 1.3.x

I took a quick stab at rewriting the plugin, but I haven't tested it  
at all, so no guarantees. But it might at least give you a head start  
if you need to hack it some more yourself. If you want to try it, you  
can find it here:


http://plugins.learningjquery.com/jquery.minmax.js

Let me know how it goes.

--Karl


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




On Aug 14, 2009, at 8:52 AM, tom.nov...@googlemail.com wrote:



Is no one using such a plugin?


On Aug 6, 9:22 am, "tom.nov...@googlemail.com"
 wrote:

Hi,

I have still to support IE6 and developping applications means min-/
max-width is often required.
Therefore I used actually thejQMinMaxplugin to make this work in
IE6. Unfortunately this plugin
is not working anymore with jQuery > 1.2.6. There seems to be a
selector problem. Does anyone
know how to fix the current plugin to get it work with 1.3.2?


http://davecardwell.co.uk/javascript/jquery/plugins/jquery-minmax/


Many thanks
T.C.




[jQuery] Re: prevalidate event?

2009-08-14 Thread tain

you could make your own function that does what you want and then
calls validation one.

On Aug 14, 8:15 pm, Michael Hahn  wrote:
> We are using JQuery for one of our software projects, and it's a very
> nice library. It's making things far easier. We are also using the
> Validation plugin, which is working wonders for form validation.
> However there's one wrinkle that we have not been able to figure out.
> Is there any way to run a function before the validation takes place?
>
> We have help text displayed in some of our text inputs and text areas,
> which are cleared onFocus (and restored onBlur if the user has not
> entered anything). We would like to clear those help text before
> validation is run, so that we don't get any false validations based on
> the help text, rather than the actual value of the field, which is
> blank.


[jQuery] Re: Web Application GUI's

2009-08-14 Thread Erik Beeson
I do 2 kinds of webapps: very "rich" (or "heavy") desktop-replacement type
apps, for which I generally use EXT, and much lighter, javascript-optional
type websites, for which I generally buy a template from ThemeForrest.
--Erik


On Fri, Aug 14, 2009 at 1:15 PM, Meroe  wrote:

>  Hello all,
>
>
>
> I assume I'm like many of you.  I'm able to write code, but when it comes
> to design I am at a loss.  I've seen some really neat layouts such as
> mochaui and extjs examples, but I'm struggling to put together one I'm happy
> with.
>
>
>
> I'm using the jquery UI layout to set up my north, west, east, etc but
> after that I'm struggling to find a design I like and one I feel will fit
> the application.  So, I'm reaching out to this group to see if anyone has
> links to examples, videos, or even ideas on good layout design that could
> assist me in moving past my "writers block" for my application.
>
>
>
> Have a wonderful weekend!
>
>
>


[jQuery] Re: Merging two jQuery collections

2009-08-14 Thread Wolf

you can use something like this with css for the visual-style..


blablablbla title


  blablablbla coming!
  Buy now blablablbla r free!
  well, atblablablbla er. Perhaps a bear,
  blablablbla ford it.


blablablbla  title 've got...


blablablbla admit it!
Nblablablbla bears.



<-->
$('a').click(function(){

$(this).next().toggle() //show or hide div fire click
});
<-->

or with your html:


  Foo
  
Bar 1
Bar 2
  
  Baz
  
 Flurp
  

<-->
$('dt').click(function(){

$(this).next().toggle() //show or hide div fire click
});
<-->

bye ^^.



[jQuery] Web Application GUI's

2009-08-14 Thread Meroe
Hello all,

 

I assume I'm like many of you.  I'm able to write code, but when it comes to
design I am at a loss.  I've seen some really neat layouts such as mochaui
and extjs examples, but I'm struggling to put together one I'm happy with.  

 

I'm using the jquery UI layout to set up my north, west, east, etc but after
that I'm struggling to find a design I like and one I feel will fit the
application.  So, I'm reaching out to this group to see if anyone has links
to examples, videos, or even ideas on good layout design that could assist
me in moving past my "writers block" for my application.

 

Have a wonderful weekend!

 



[jQuery] Re: Cycle Plugin - Changing the options of the cycle

2009-08-14 Thread Z-Ender

Thanks for the response.

>But you could stop and then restart the slideshow with a diff
>slideExpr.

I'm not sure if I understand how to do that.  Am I recreating the
cycle to set the new slideExpr like this?

$("#chg").click(function(){
$('#show).cycle('stop');
$('#show).cycle({
fx: 'scrollHorz'
, slideExpr:'b'
, next: "#next"
, prev: "#prev"
})
}


I've tried something like the above and it just stopped working.  Have
I missed anything?


[jQuery] called ajaxComplete only on specific div

2009-08-14 Thread dreame4

Hi,

This is my simplified html code:







and (simplified) JS:

function getCalendar() {
$('#calendar').bind('ajaxComplete', function() {
getTest();
});
}
and function getTest() uses ajax but insert data into div#test.

I suppose the problem with duplicating ajaxComplete calls (with each
another called getCalendar, getTest() is called one more time) is that
"$('#calendar').bind('ajaxComplete') is called even when function
getTest() is called. That's right? So how to bind ajaxComplete only to
specific div?

Thanks for help.
--
dreame4


[jQuery] Re: Can't get my head around this chain

2009-08-14 Thread Hector Virgen
That HTML should be traversable without any modifications.
What I would do is traverse up to the containing  by using $.closest()

var tr = $(this).closest('tr');

Then, find the  with the name attribute:

var a = tr.find('a[name]');

from there, you can pull the "5029" out of the name attribute or text:

var num = a.attr('name');
// or
var num = a.text();

In the end it will look something like this:

$('a:contains("Edit")').click(function(event)
{
var edit = $(this);
var tr = edit.closest('tr');
var a = tr.find('a[name]');
var num = a.attr('name');
console.log('num', num);
event.preventDefault();
});

--
Hector


On Fri, Aug 14, 2009 at 12:15 PM, Laker Netman wrote:

>
> Thanks James. Yeah, I'd like to trim some of the bulk from this app,
> but I'm one of several "cooks", so I have to compromise a bit ;-)
>
> Appreciate the response.
>
> Laker
>
> On Aug 14, 1:26 pm, James  wrote:
> > I think the best place to put it is in the , so it's something
> > like:
> > 
> >
> > and you can retrieve it when you click on Edit (untested):
> > var id = $(this).closest("tr").attr("id").split('_')[1];  // 1234
> >
> > But for your current scenario, you can probably do something like
> > (untested):
> > var id = $(this).closest("tr").children("td:first").find("a").attr
> > ("name");
> >
> > There are several ways to doing this. Another one is getting the
> > closest td and then it's first sibling, an so on.
> > But in my opinion, having the id on the table row is the easiest. All
> > your other links in the other 's can easily reference it also.
> >
> > On Aug 14, 5:35 am, Laker Netman  wrote:
> >
> > > Hi all. Here is a section of a page I generate:
> > > 
> > > 5029
> > > 1100
> > > 2
> > > Products
> > >  href="index.cfm?action=deletenode&categoryid=5029">Delete > > a>
> > >  href="index.cfm?action=newnode&categoryid=5029">New > > td>
> > > Edit > > a>   
> > > Move
> Up > > a>
> > >  href="index.cfm?action=movedown&categoryid=5029">Move
> > > Down
> > > 
> > > Move to...
> > > 
> > > 
> > > 
> >
> > > When I click on the "Edit" link in the 7th TD (or 6th for you zero-
> > > based folks :) I want to call a function and have 5029 available to
> > > use as a parameter to it. I really don't care which element or
> > > attribute I use to get the value (as it obviously appears in several
> > > places), whichever is easiest. I'm thinking the 1st TD, either the "a"
> > > name attribute or text.
> >
> > > I just can't seem to put together a chain of selectors together that
> > > gets me what I want.
> >
> > > Can someone help?
> >
> > > TIA,
> > > Laker
>


[jQuery] Re: Can't get my head around this chain

2009-08-14 Thread Laker Netman

Thanks James. Yeah, I'd like to trim some of the bulk from this app,
but I'm one of several "cooks", so I have to compromise a bit ;-)

Appreciate the response.

Laker

On Aug 14, 1:26 pm, James  wrote:
> I think the best place to put it is in the , so it's something
> like:
> 
>
> and you can retrieve it when you click on Edit (untested):
> var id = $(this).closest("tr").attr("id").split('_')[1];  // 1234
>
> But for your current scenario, you can probably do something like
> (untested):
> var id = $(this).closest("tr").children("td:first").find("a").attr
> ("name");
>
> There are several ways to doing this. Another one is getting the
> closest td and then it's first sibling, an so on.
> But in my opinion, having the id on the table row is the easiest. All
> your other links in the other 's can easily reference it also.
>
> On Aug 14, 5:35 am, Laker Netman  wrote:
>
> > Hi all. Here is a section of a page I generate:
> > 
> >         5029
> >         1100
> >         2
> >         Products
> >          > href="index.cfm?action=deletenode&categoryid=5029">Delete > a>
> >         New > td>
> >         Edit > a>   
> >         Move Up > a>
> >         Move
> > Down
> >         
> >                         Move to...
> >                 
> >         
> > 
>
> > When I click on the "Edit" link in the 7th TD (or 6th for you zero-
> > based folks :) I want to call a function and have 5029 available to
> > use as a parameter to it. I really don't care which element or
> > attribute I use to get the value (as it obviously appears in several
> > places), whichever is easiest. I'm thinking the 1st TD, either the "a"
> > name attribute or text.
>
> > I just can't seem to put together a chain of selectors together that
> > gets me what I want.
>
> > Can someone help?
>
> > TIA,
> > Laker


[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread Laker Netman

Well, you can generate as much mark up as you want, but if I
understand what you're trying to do, it's redundant :) You can style
the UL, LI and A tags directly without a DIV wrapper. Also, your last
snippet is a little confusing. You wouldn't place CSS within the DIV.
The CSS would be inline in your document head or a separate file and
*apply* to whatever class or id was assigned to the DIV (or UL, LI, A,
etc).

I would suggest taking a look at the CSS file included with the
superfish download for examples of "skinning" the menu. Also, if you
have FireFox handy install Firebug and the Web Developer toolbar and
start poking around with those tools. It will be very enlightening :)

Laker

On Aug 14, 12:29 pm, Stockypotty  wrote:
> Ok thank you I will try this.
>
> Although what about if I put a div with an id around each menu tab.
> something like this
>
> 
> 
> 
>
> what do you reckon?


[jQuery] animate / carousel

2009-08-14 Thread stefan

HTML:





1
2
3
4
5
6
7
8



JQUERY:

var div = $('#test');

var ul = $("ul", div);

var li = $("li", ul);

var li_width = 100;

$('#btn').click(function(){
return move(8);
});

function move(to)
{
ul.animate({left: -(to*li_width}, 100, null, function () { li.slice
(to).slice(0,4) });
}

QUESTION:

how come the function 'move' isn't working? it's not moving the first
4 lis to the left for some reason

...i didn't include the css, because there shouldn't be the problem
with this script

anyway, any help would be appreciated (:


[jQuery] Re: Cycle Plugin - Changing the options of the cycle

2009-08-14 Thread Mike Alsup

> I define a cycle in document.ready as per usual.  In my cycle I have
> different sets of images that i want to cycle through and only want
> certain ones to cycle as selected using the slideExpr option.  Is
> there a way to change this option from:
> slideExpr: 'a'
> to:
> slideExpr: 'b'


Nope. But you could stop and then restart the slideshow with a diff
slideExpr.


[jQuery] [validate] prevalidate event?

2009-08-14 Thread Michael Hahn

We are using JQuery for one of our software projects, and it's a very
nice library. It's making things far easier. We are also using the
Validation plugin, which is working wonders for form validation.
However there's one wrinkle that we have not been able to figure out.
Is there any way to run a function before the validation takes place?

We have help text displayed in some of our text inputs and text areas,
which are cleared onFocus (and restored onBlur if the user has not
entered anything). We would like to clear those help text before
validation is run, so that we don't get any false validations based on
the help text, rather than the actual value of the field, which is
blank.


[jQuery] Re: Can't get my head around this chain

2009-08-14 Thread James

I think the best place to put it is in the , so it's something
like:


and you can retrieve it when you click on Edit (untested):
var id = $(this).closest("tr").attr("id").split('_')[1];  // 1234

But for your current scenario, you can probably do something like
(untested):
var id = $(this).closest("tr").children("td:first").find("a").attr
("name");

There are several ways to doing this. Another one is getting the
closest td and then it's first sibling, an so on.
But in my opinion, having the id on the table row is the easiest. All
your other links in the other 's can easily reference it also.

On Aug 14, 5:35 am, Laker Netman  wrote:
> Hi all. Here is a section of a page I generate:
> 
>         5029
>         1100
>         2
>         Products
>         Delete a>
>         New td>
>         Edit a>   
>         Move Up a>
>         Move
> Down
>         
>                         Move to...
>                 
>         
> 
>
> When I click on the "Edit" link in the 7th TD (or 6th for you zero-
> based folks :) I want to call a function and have 5029 available to
> use as a parameter to it. I really don't care which element or
> attribute I use to get the value (as it obviously appears in several
> places), whichever is easiest. I'm thinking the 1st TD, either the "a"
> name attribute or text.
>
> I just can't seem to put together a chain of selectors together that
> gets me what I want.
>
> Can someone help?
>
> TIA,
> Laker


[jQuery] Re: Listmenu - tips for making it faster in IE

2009-08-14 Thread Jack Killpatrick


Hi Anoop.

I spent considerable time tuning the code for performance, but yes, IE 
does lag behind, especially when approaching 1000 items or more. I found 
Safari and Chrome to both be quite fast and Firefox nearly as fast as 
those. The IE issue stems from the code that moves the items from the 
original UL or LI into the separate lists used for each submenu.


I messed around a little with implementing a built-in Loading... 
message, but found IE's behavior so annoying (it likes to appear hung 
when it's not and workarounds only delayed the load time) that I decided 
not to include that in the plugin. I'm on vacation right now, but early 
next week could take a look at a workaround you might be able to use to 
show a message and then hide it after IE is done chugging way. Let me 
know and I'll put some thought into it.


Thanks,
Jack

Anoop kumar V wrote:
I am using listmenu and it works fantastically well... except only on 
firefox.


On IE 7 it is quite slow, the lag is very noticeable - the menu 
appears after about 6-7 seconds and the counts come much later after 
about 8-10 seconds. Since this is an intranet app, I need to ensure 
that IE 7 works very well. I have about 2000 elements and they are not 
at all balanced across the alphabets...


Are there any tips that I could follow such that the menu displays 
quicker in IE? Or at the very least is there a way I can show a 
"Loading... " text or an animated gif while the menu loads..


But thank you for this wonderful plugin it is really well made, I only 
wish IE would catch up soon ;-)


Thanks,
Anoop





[jQuery] Re: Citation for jQuery

2009-08-14 Thread Nathaniel

The paper describes a scientific visualization tool that uses jQuery
as a component, noting that jQuery is used to simplfy and speed up XML
investigation, as well as simplify UI.  Any general source will do,
but if jQuery has a preferred text or conference paper, I'll use it.

Thanks for your time,
Nathaniel

On Aug 12, 1:02 pm, Jörn Zaefferer 
wrote:
> Hi Nathaniel,
>
> what exactly do you want to cite? Its not clear from your question.
>
> Regards
> Jörn
>
> On Tue, Aug 11, 2009 at 9:15 PM, Nathaniel wrote:
>
> > Hello Devs:
>
> > I'm preparing an academic paper in which I want to cite jQuery and
> > jQuery UI.  Is there a specific publication you would recommend? At
> > present I've got "jQuery Reference Guide" by Caffer and Swedberg, but
> > perhaps there's an article somewhere which is more appropriate?
>
> > Just want to give credit where it's due.
>
> > --Nathaniel Tagg


[jQuery] announce: jQuery.html and jQuery.createBogoMenu()

2009-08-14 Thread Stephan Beal

Hello, fellow scripters!

Just uploaded:

http://wanderinghorse.net/computing/javascript/jquery/html/

jQuery.html contains factory functions for generating DOM elements.
Its intention is to help clean up script code by allowing us (well,
me) to remove all inlined HTML from my script code (i HATE inlined
HTML).

And:

http://wanderinghorse.net/computing/javascript/jquery/bogomenu/

jQuery.createBogoMenu() is a function which takes an "idealized menu
representation" (a JS object structured like a menu) and creates a
visual menu for it (by generating a conventional nested UL structure).
The end result is an accordion-like menu. However, because it
generates the menu from JS code, as opposed to creating it from
embedded HTML elements (where the layout and script code tend to get
all mixed in), there are a couple of differences from most menu
plugins:

a) It's much easier to modify for your own purposes because you can
easily change the code it generates. (That said, it uses jQuery.html
to generate the HTML.)

b) The same menu structure can be fed through a different generator to
generate menus compatible with other menu plugins. That is, if all
menu plugin creators could decide on one general structure, we could
use the same structure directly with arbitrary menu plugins.

c) It does not degrade AT ALL. The menus are generated via script, so
a browser which can't run scripts can't see the menu. That said, this
was written for rich client applications which cannot run at all
without scripts, so "degrading gracefully" is not a design concern.



[jQuery] Re: Merging two jQuery collections

2009-08-14 Thread Hector Virgen
I'm actually working with definition list:

  Foo
  Bar 1
  Bar 2

  Baz
  Flurp


The definition list will contain a variable amount of  and  tags, so
what I am trying to do is select all  tags, then loop through them to
select their related  tags. Then later, based on user interaction, I
will show/hide the set.

var sets = {};
var dl = $('dl');
var dts = dl.find('dt');
dts.each(function()
{
  var dt = $(this);
  var set = dt.add(dt.nextAll('dt'));
  var label = dt.text();
  sets[label] = set;
});

--
Hector


On Fri, Aug 14, 2009 at 10:42 AM, Wolf  wrote:

>
> i dont understand , but you want append content de foofbars to foo or
> mixed ..?
> what contains foo and foobars?


[jQuery] Re: Merging two jQuery collections

2009-08-14 Thread Wolf

i dont understand , but you want append content de foofbars to foo or
mixed ..?
what contains foo and foobars?


[jQuery] Merging two jQuery collections

2009-08-14 Thread Hector Virgen
Hello,
I have two jQuery collections that I'd like to merge into one:

var foo = $('#foo');
var foobars = foo.nextAll('.bar');

I've tried using $.add() to combine the two, but it doesn't seem to be
working:

foo.add(foobars);
foo.css('border', '2px solid #f00'); // only #foo is affected

I've confirmed that foo and foobars both contain elements by checking the
length property. Is there a way to merge two or more collections into one?

I cannot make changes to the HTML, so wrapping them in a container div is
not an option.

Thanks in advance for the help!

--
Hector


[jQuery] Invite jquery developers to join our open source project: "Tellurium Automated Testing Framework"

2009-08-14 Thread John

Tellurium Automated Testing Framework (Tellurium) is an automated web
testing framework built on the top of the Selenium framework at the
current stage. We have started our own testing driving project,
Tellurium Engine, which will be using jQuery. We also have a Firefox
plugin project, TrUMP, the version 0.1.0 has been release in March and
we need to enhance it and most likely will use jQuery for some part of
the code.

Here are the main features of Tellurium:

* Abstract UI objects to encapsulate web UI elements
* DSL for UI definition, actions, and testing
* Composite Locator to use a set of attributes to describe a UI
element
* Group locating to exploit information inside a collection of UI
components
* Dynamically generate runtime locators to localize changes
* UI module for structured test code and re-usability
* UI templates for dynamic web content
* XPath support
* jQuery selector support to improve test speed in IE
* Locator caching to improve speed
* Javascript event support
* Use Tellurium Firefox plugin, Trump, to automatically generate UI
modules
* Dojo and ExtJS widget extensions
* Data driven test support
* Selenium Grid support
* JUnit and TestNG support
* Ant and Maven support

If you are good at jQuery and Javascript, have free time and are
willing to be an active committer of Tellurium (active involvement is
very important to us), please send an email to me.

Once you join the team as a core member, we will provide you the open
source IntelliJ IDEA license and JProfiler license to help you with
the development.

Be aware, this is not a job post. Tellurium is an open source project
and there is not company behind it.

To better know tellurium, you can visit our project site at

http://code.google.com/p/aost/

We have a video, couple screencasts, and presentation slides on

http://code.google.com/p/aost/downloads/list

We also have a 117-page user guide on

http://telluriumdoc.googlecode.com/files/TelluriumUserGuide.Draft.pdf

Thanks in advance,

Jian


[jQuery] Re: Tablesorter dates

2009-08-14 Thread aquaone
It would likely be much less work to change the dates to match a
standardized numeric format than to write your own parser. The performance
would likely be better as well.

If this is not an option, let me know the full date format (I'm not even
seeing a year in this) and the language being used, so that I can construct
a month array. Again, I would prefer not to do such a thing... but if
support is needed I can help.

aquaone


On Fri, Aug 14, 2009 at 02:08, badtant  wrote:

>
> Hi!
>
> I'm using this plugin http://tablesorter.com/docs/ but have some
> trouble with sorting my dates.
> I want to have them show like this:
> 12 januari
> 29 januari
> 12 april
> 29 april
> 12 maj
> 29 maj
>
> I've figured I probable need to write a new parser for this but I'm
> not quite sure how. Anyone good at this that can help?
>
> Thanks
> Niklas


[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread Stockypotty

Ok thank you I will try this.

Although what about if I put a div with an id around each menu tab.
something like this





what do you reckon?


[jQuery] Re: Detect Capital Letters

2009-08-14 Thread LindsayT

Thanks guys for your help!  I'll get back to my project over the
weekend and see if any of this works for what I'm doing!

Lindsay

On Aug 9, 2:09 pm, Karl Swedberg  wrote:
> haha, you got me! so, yeah, it would be a bit more work. point  
> taken! :-p
>
> --Karl
>
> On Aug 9, 2009, at 1:55 PM, Michael Geary wrote:
>
> > That would work for you and for me, but would it work for everyone?
>
> > alert( isUpperCase('JÖRN') ? 'good' : 'bad' );  // ;-)
>
> > -Mike
>
> > From: Karl Swedberg
> > Shouldn't be too much work. Wouldn't this do it?
>
> > function isUpperCase( string ) {
> >     return /^[A-Z]+$/.test(string);
> > }
> > On Aug 8, 2009, at 8:34 PM, Michael Geary wrote:
>
> >> If you want to check that the string contains *only* uppercase  
> >> characters
> >> and no "case-less" characters (so that "ABC" would return true but  
> >> "A B C"
> >> would return false), that would be a bit more work.


[jQuery] Re: text slider

2009-08-14 Thread dziobacz

Why jquery doesn't have text slider ?
Screen: http://yfrog.com/5kbeztytuuitnj


[jQuery] Re: Filter (attribute, value)

2009-08-14 Thread Geir

Thanks!

Tried
  var here = $("#Navigation li a[href='+Path+']");
and
 var here = $("#Navigation li").$("a[href='+relPath+']"); (Are
they totally equal?)
still gives me nothing.

I'm not very trained in javascript/jQuery but I thing you
misunderstood my line 1 and 2.
relPath is for the relative path -without the http-domain-prefix (my
navigation tree is with relative urls)
The http-domain-prefix is either on my local machine or on my site-
domain.

I've checked out the docs, but the use of quotes given here throws out
an error in my Firebug:
http://docs.jquery.com/Selectors/attributeEquals#attributevalue


[jQuery] Re: image slider effect using jquery

2009-08-14 Thread sudhakararaog


thanks for letting me know.



Richard D. Worth-2 wrote:
> 
> This is usually called a carousel, or sometimes a slider or content slider
> (not to be confused with a trackbar-type slider, like jQuery UI
> Slider).
> Here are some popular ones, in no particular order:
> Cycle 
> jCarousel 
> jCarousel Lite 
> Easy
> Slider
> Agile Carousel 
> 
> Each has various options and are customizable. I'm sure I've missed some,
> sorry. There's a partial list here:
> 
> http://wiki.jqueryui.com/Essential-Controls-List#carousel
> 
> and you can search the plugin site as well:
> 
> http://plugins.jquery.com/search/node/carousel+type:project_project
> 
> - Richard
> 
> On Fri, Aug 14, 2009 at 12:36 PM, sudhakararaog
> wrote:
> 
>>
>>
>> hi
>> i need a slieshow effect that i want to create for my personal website.
>>
>> following is what i need
>> i want to display an image and below that will be text and this text
>> should
>> be clickable and open in a new window and this way i want to show few
>> images
>> and text with a certain
>>
>> duration for each.
>>
>> there should be no left arrow and right arrow, instead each picture along
>> with the text should move from the right to left or from left to right
>> and
>> stay for few seconds and the
>>
>> next one should appear and the text should be clickable and open in a new
>> window.
>>
>> can anyone refer me to a website from where i can get this effect.
>>
>> please advice.
>>
>> thanks.
>> --
>> View this message in context:
>> http://www.nabble.com/image-slider-effect-using-jquery-tp24974773s27240p24974773.html
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/image-slider-effect-using-jquery-tp24974773s27240p24975319.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: image slider effect using jquery

2009-08-14 Thread Richard D. Worth
This is usually called a carousel, or sometimes a slider or content slider
(not to be confused with a trackbar-type slider, like jQuery UI
Slider).
Here are some popular ones, in no particular order:
Cycle 
jCarousel 
jCarousel Lite 
Easy 
Slider
Agile Carousel 

Each has various options and are customizable. I'm sure I've missed some,
sorry. There's a partial list here:

http://wiki.jqueryui.com/Essential-Controls-List#carousel

and you can search the plugin site as well:

http://plugins.jquery.com/search/node/carousel+type:project_project

- Richard

On Fri, Aug 14, 2009 at 12:36 PM, sudhakararaog wrote:

>
>
> hi
> i need a slieshow effect that i want to create for my personal website.
>
> following is what i need
> i want to display an image and below that will be text and this text should
> be clickable and open in a new window and this way i want to show few
> images
> and text with a certain
>
> duration for each.
>
> there should be no left arrow and right arrow, instead each picture along
> with the text should move from the right to left or from left to right and
> stay for few seconds and the
>
> next one should appear and the text should be clickable and open in a new
> window.
>
> can anyone refer me to a website from where i can get this effect.
>
> please advice.
>
> thanks.
> --
> View this message in context:
> http://www.nabble.com/image-slider-effect-using-jquery-tp24974773s27240p24974773.html
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: Access denied when calling webservice method using jquery

2009-08-14 Thread KeeganWatkins

can you post some code? it's hard to offer suggestions with nothing
more than an error code to analyze...

although I'd bet you're calling your webservice via Ajax, and that the
service is not on the same domain. if this is the case, you'll need to
either: a) move the service to the same domain as the calling page, or
b) use JSONP (not Ajax) to call the webservice.


On Aug 13, 5:01 am, dinesh  wrote:
> Hi All...
>
> I want to call C# method from jquery. So, I placed those methods in
> webservice and trying to call from jquery. But, it is giving an error
> as shown below:
>
> Access to restricted URI denied" code: "1012
>
> This is seen from the Firebug console.
> Could any one help me?
>
> -Thanks


[jQuery] Re: JQuery Treeview Navigation frames

2009-08-14 Thread Laker Netman

The short answer to either scenario is "yes". It's really more based
on whatever your server-side code creates in the unordered list sent
to the browser. Alternatively, jQuery could modify the UL after it's
delivered, but if it's very large at all you may see some client-side
performance issues with rendering speed.

You would just need to specify a "target" attribute in the URLs to
send the output to a different frame.

As far as acting on the click itself, yeah, jQuery can handle that
easily. Including server (AJAX) calls, etc. Check out the
documentation and tutorials at http://docs.jquery.com/

Laker

On Aug 14, 10:28 am, "Mr. V"  wrote:
> I am new to JQuery and Treeview and I am in trying to assess if the
> treeview could be a lightweight and efficient replacement for our
> current 3rd party tree control.
>
> Can the Treeview node hyperlink load the url in a different frame ?
>
> Alternatively, is it possible to catch the Node On Click event and do
> some business logic to figure out the exact url and then open the url
> in a separate frame or an AJAX Tab control ?


[jQuery] Re: .load() and executing JavaScript from loaded content

2009-08-14 Thread Wolf

I think you should try this, send the script or function.

example.
$("#form_dialog").dialog({ /*some options */})
   .load("url",{}, function(){
 $("head").html("\n" +
"function step1() {\n" +
" setTimeout('step2()', 10);\n" +
"}\n" +
"function step2() {\n" +
"   window.print();\n" +
"  window.close();\n" +
"}\n" +
"\n") });




[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread Laker Netman

A little Googling may help :) ...but for starters how about:
var i = 0;
$("li").each(function(){i++;$(this).addClass('image'+i)});

You can change the first selector to whatever is right for
you ...probably not every LI on the page :)
You can change the word "image" in the addClass() to whatever you
want, also. The result would be:

A
B
C


Though IDs would be more logical than classes if *every* single LI is
to have a unique image. Better form.

That would amount to:
var i = 0;
$("li").each(function(){i++;$(this).attr('id','image'+i)});

Creating:

A
B
C


HTH,
Laker

On Aug 14, 11:09 am, Stockypotty  wrote:
> Right ok, I will search on how to add a class to the menu, do you know
> of any tutorials?
>
> Thanks guys


[jQuery] Re: Help with using the 'not' selector

2009-08-14 Thread Wolf

hi you have ask if the id is different, then dissappear the div o
element

$("body").click(function(){
IF($(this).attr('id') !="FM_OPTIONS")
{
  $("#FM_OPTIONS").fadeOut('fast');
}
});


[jQuery] image slider effect using jquery

2009-08-14 Thread sudhakararaog


hi 
i need a slieshow effect that i want to create for my personal website. 

following is what i need 
i want to display an image and below that will be text and this text should
be clickable and open in a new window and this way i want to show few images
and text with a certain 

duration for each. 

there should be no left arrow and right arrow, instead each picture along
with the text should move from the right to left or from left to right and
stay for few seconds and the 

next one should appear and the text should be clickable and open in a new
window. 

can anyone refer me to a website from where i can get this effect. 

please advice. 

thanks. 
-- 
View this message in context: 
http://www.nabble.com/image-slider-effect-using-jquery-tp24974773s27240p24974773.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] JQuery Treeview Navigation frames

2009-08-14 Thread Mr. V

I am new to JQuery and Treeview and I am in trying to assess if the
treeview could be a lightweight and efficient replacement for our
current 3rd party tree control.

Can the Treeview node hyperlink load the url in a different frame ?

Alternatively, is it possible to catch the Node On Click event and do
some business logic to figure out the exact url and then open the url
in a separate frame or an AJAX Tab control ?


[jQuery] Cycle Plugin - Changing the options of the cycle

2009-08-14 Thread Z-Ender

I define a cycle in document.ready as per usual.  In my cycle I have
different sets of images that i want to cycle through and only want
certain ones to cycle as selected using the slideExpr option.  Is
there a way to change this option from:
slideExpr: 'a'
to:
slideExpr: 'b'

another alternative i've considered is to make a cycle of cycles.
Does anyone have an example of that?


[jQuery] Re: Validate groups of input fields, checkbox highlight and reset

2009-08-14 Thread Carlos Becar
>
> 2. Checkbox highlight. I am using a class highlight for all the
> errors. I use required checkbox, so at least 1 checkbox must be
> checked. If I check the first item, then uncheck, the error message
> appear and the error class highlight also successfully displayed.
> However, if I check the second or the third (etc) item, then uncheck,
> only the error msg appear, the error class doesn't highlight. Here is
> my code:
>
>highlight: function( element, errorClass, validClass  ) {
>
>  $(element).parents('li').addClass(errorClass).removeClass
> (validClass);
>},
>unhighlight: function( element, errorClass, validClass  ) {
>
>  $(element).parents('li').removeClass(errorClass).addClass
> (validClass);
>},
>


Example:

function example(errorClass, validClass){
/*you have to ask if length is equal then */
if($("input[name*='chkList']").length ==
$("input[name*='chkList']:not(:checked)").length){
/*show the error class highlight or alerts or your class assigned to
all checkbox */
/* you can add class without send to the function)
$("input[name*='chkList']").addClass(errorClass)
>
> alert("please select at least one option")
   }
   else
   {
  $("input[name*='chkList']").removeClass(errorClass)
   }
}

but , i dont know because use "removeClass" or addClass" without respective
parameters, this not add or remove or fire nothing .

-- 
Atte.
Carlos Becar.


[jQuery] Re: Filter (attribute, value)

2009-08-14 Thread Carlos Becar
   var path =  var here = "";
   path = "http://mydomain.localhost'' || "http://mydomain.com";;
   var here = $("#Navigation li a[href='+Path+']");

href must contain simple quotes because you use double quotes in the
beginning, but if have different href you can use something like this
$("a[href='+Path+']")
-- 
Atte.
Carlos Becar.


[jQuery] Re: Code inside click() event not firing.

2009-08-14 Thread Carlos Becar
james s correct you should use method delegation or plugins like listen or
intercepted .. documetnation jqueryis the best !
-- 
Atte.
Carlos Becar.


[jQuery] .load() and executing JavaScript from loaded content

2009-08-14 Thread Benjamin Wohlwend

Hi,

I have a form with a couple of ajaxified inputs (they have dynamically
generated 

[jQuery] Re: Filter (attribute, value)

2009-08-14 Thread Wolf

  var path =  var here = "";
   path = "http://mydomain.localhost'' || "http://mydomain.com";;
   var here = $("#Navigation li a[href='+Path+']");

href must contain simple quotes because you use double quotes in the
beginning, but if have different href you can use something like this $
("a[href='+Path+']")


[jQuery] Re: Event click not fired by code added after the page is loaded

2009-08-14 Thread Carlos Becar
if you load content with ajax you should send code funcionality later load
the content, example.

$("#container").load('url',{},function(){

  /*here you put codes for fires clicks or something*/
   $(".addanswer").click(function()

   /* code here */
   });

});

or use plugin like live or listen

bye.
-- 
Atte.
Carlos Becar.


[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread amuhlou

w3schools is a great resource for web tutorials.
http://www.w3schools.com/tags/att_standard_class.asp

On Aug 14, 12:09 pm, Stockypotty  wrote:
> Right ok, I will search on how to add a class to the menu, do you know
> of any tutorials?
>
> Thanks guys


[jQuery] Re: Replace string characters using jQuery

2009-08-14 Thread MiKiTiE

Thank you for your help. The global flag seemed to do the trick, if I
get problems with that in the future I will try the encodeURIComponent
method.



On Aug 5, 9:42 pm, Karl Swedberg  wrote:
> Hi there,
>
> It looks like your test:
>
> > var test = searchval.text().replace(' ','+');
>
> is trying to use the .text() jQuery method on a string. Remove that  
> part and it should work, sort of. It'll only replace the first  
> instance of a space. Instead, use the regex replace and set the global  
> (g) flag:
>
>         var test = searchval.replace(/ /g,'+')
>
> But that isn't much better. What you really ought to use is  
> encodeURIComponent:
>
>         var test = encodeURIComponent(searchval);
> see how that works.
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Aug 5, 2009, at 5:00 AM, MiKiTiE wrote:
>
>
>
> > Hi Everyone
>
> > First post - please be gentle.
>
> > I am running a search on my web site which uses jQuery to take the
> > search terms and build up a URL based on them.
>
> > For example, if someone searches for "chair" my URL will be appended
> > with /chair/.
>
> > However, if someone searches for something which is two words, for
> > example "chair covers" I need the space inbetween to be replaced by a
> > "+" sign so the URL will now be appended with /chair+covers/
>
> > I'm not sure if it is possible to string replace in jQuery? Here is my
> > current code:
>
> > function sendSearchInput(whichelement,hiddeninput,formid) {
>
> > hval = $("#"+hiddeninput).val();
> > $("#"+formid).submit(function() {
> >    if ($("input:#"+whichelement).val() != hval) {
>
> >            var searchval = $("#"+whichelement).val().toLowerCase();
>
> >            $("#"+formid).attr("action","retail/search/"+searchval+"/");
> >                    return true;
> >            }
>
> >              $("input:#"+whichelement).focus();
>
> >      return false;
> >    });
> > }
>
> > This will basically check that the form is not the default value
> > (specified in the hidden field "hval") and then change the search term
> > to lowercase and append the URK using "attr". I have tried a couple of
> > methods including
>
> > var test = searchval.text().replace(' ','+');
>
> > And then trying to alert "test" to check it but the function just
> > simply doesn't work.
>
> > Any help here would be much appreciated, thank you.


[jQuery] Help with using the 'not' selector

2009-08-14 Thread MiKiTiE

Hi group,

I would appreciate a point in the right direction here, as I seem to
be getting lost. I would like to be able to write a function which
will trigger when the mouse is clicked, but only do a certain thing
based on WHAT is clicked. Which is why I figured the "not" selector
would be useful.

Here is my function:

function closeIt(){
 $().not("#FM_OPTIONS").click( function() {
$("#FM_OPTIONS").toggle();
});
}

Basically what I want to say is, if what I click does NOT have the id
'#FM_OPTIONS' (it's a floating div), make that div disappear. In other
words, if someone clicks away from it, it should close. However it
seems that even if I click the div itself, it makes it disappear as
well - surely the 'not' selector is supposed to prevent this? Am I
structuring the function incorrectly? Any help would be much
appreciated.

Thank you.
Mike


[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread Stockypotty

Right ok, I will search on how to add a class to the menu, do you know
of any tutorials?

Thanks guys


[jQuery] Can't get my head around this chain

2009-08-14 Thread Laker Netman

Hi all. Here is a section of a page I generate:

5029
1100
2
Products
Delete
New
Edit  
Move Up
Move
Down

Move to...





When I click on the "Edit" link in the 7th TD (or 6th for you zero-
based folks :) I want to call a function and have 5029 available to
use as a parameter to it. I really don't care which element or
attribute I use to get the value (as it obviously appears in several
places), whichever is easiest. I'm thinking the 1st TD, either the "a"
name attribute or text.

I just can't seem to put together a chain of selectors together that
gets me what I want.

Can someone help?

TIA,
Laker



[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread amuhlou

like Liam said, you need to edit the HTML of the menu and add a class
or id to each menu item, like they did in the picture you posted. Then
you can target it with CSS.

On Aug 14, 10:58 am, Stockypotty  wrote:
> Yeah as you can see in this picture:
>
> http://i236.photobucket.com/albums/ff288/paramore_020/quizilla.jpg
>
> They have a seperate ID for each menu, which allows them to have a
> separate CSS style for each one.
>
> Do you know how I can give each menu on suckerfish it's own CSS style
> section?
>
> I think I need to add in my css page something like
>
> div.52 {
>
>     background-image: URL(whateveritis)
>
> }
>
> Or somethign along those lines.
>
> Thanks!


[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread Stockypotty

Yeah as you can see in this picture:

http://i236.photobucket.com/albums/ff288/paramore_020/quizilla.jpg

They have a seperate ID for each menu, which allows them to have a
separate CSS style for each one.

Do you know how I can give each menu on suckerfish it's own CSS style
section?

I think I need to add in my css page something like

div.52 {

background-image: URL(whateveritis)

}

Or somethign along those lines.

Thanks!


[jQuery] Re: Getting class attributes??

2009-08-14 Thread Lyle

I had a good look at JQuery.rule. I'm sure it's great, but the
complete lack of any credible documentation makes it pretty unusable.
Even the online demo could do with some text explaining what's
actually going on and why, rather than just having some links. After
getting frustrated looking at it, I just wrote my own function
instead:-

function getClassRule(classname,rulename) {
var retval;
for ( var i=0; i < document.styleSheets.length; i++ ) {
var style_sheet = document.styleSheets[i];
if ( !style_sheet ) { continue; }
var sheet_rules = style_sheet.cssRules || style_sheet.rules;
for (var j = 0; j < sheet_rules.length; j++) { // later rules
will overide retval//
var rule = sheet_rules[j];
if ( rule.selectorText ) {
var class_name = 
rule.selectorText.replace(/\./g, '');
if (class_name == classname) {
if ( rule.style[rulename] ) {
retval = rule.style[rulename];
}
//return rule.style[rulename]; //Class 
may be defined in several
sheets, rules are merged
}
}
}
}
return retval;
}


Lyle


[jQuery] Re: plugin problem with jQuery 1.3.2

2009-08-14 Thread Stephan Beal

On Aug 6, 9:22 am, "tom.nov...@googlemail.com"
 wrote:
> I have still to support IE6 and developping applications means min-/
> max-width is often required.
> Therefore I used actually the jQMinMax plugin to make this work in
> IE6. Unfortunately this plugin
> is not working anymore with jQuery > 1.2.6. There seems to be a
> selector problem. Does anyone
> know how to fix the current plugin to get it work with 1.3.2?

If you're required to still use MSIE 6.x, then why not use jQuery
1.2.5 or lower for the project? It sounds reasonable to use an old
version of jQ with an ancient version of MSIE.


[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread Liam Potter


how about, editing your html?

amuhlou wrote:

a good start would be to use firebug and inspect the code for the
example page.



On Aug 14, 8:30 am, Stockypotty  wrote:
  

Sorry I didn't mean that, early morning ^^

I was wondering if you had any good tutorials on how to put a unique
class name on each tab?

Unfortunately my site is not running live if that is what you meant
about a test page. However if you go to this site:

http://www.quizilla.com/

You can see that the top menu has pictures as the tabs, and then when
the user puts their mouse over it, the drop down menu appears. This is
what I hope to achieve!





[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread amuhlou

a good start would be to use firebug and inspect the code for the
example page.



On Aug 14, 8:30 am, Stockypotty  wrote:
> Sorry I didn't mean that, early morning ^^
>
> I was wondering if you had any good tutorials on how to put a unique
> class name on each tab?
>
> Unfortunately my site is not running live if that is what you meant
> about a test page. However if you go to this site:
>
> http://www.quizilla.com/
>
> You can see that the top menu has pictures as the tabs, and then when
> the user puts their mouse over it, the drop down menu appears. This is
> what I hope to achieve!


[jQuery] Re: Getting class attributes??

2009-08-14 Thread Richard D. Worth
See jQuery.Rule, by Ariel Flesler:
http://flesler.blogspot.com/2007/11/jqueryrule.html

- Richard

On Fri, Aug 14, 2009 at 6:17 AM, Lyle  wrote:

>
> Hi,
>  I need to be able to get the css attributes that a particular class
> defines. Such that if I have a class called "SomeClass" I want to see
> if it defines the attribute "position". I've tried using .css on an
> element that has the class, but of course that picks up the defaults
> and any inheritance.
>
>
> Thanks in advance
>
> Lyle
>


[jQuery] Re: plugin problem with jQuery 1.3.2

2009-08-14 Thread tom.nov...@googlemail.com

Is no one using such a plugin?


On Aug 6, 9:22 am, "tom.nov...@googlemail.com"
 wrote:
> Hi,
>
> I have still to support IE6 and developping applications means min-/
> max-width is often required.
> Therefore I used actually thejQMinMaxplugin to make this work in
> IE6. Unfortunately this plugin
> is not working anymore with jQuery > 1.2.6. There seems to be a
> selector problem. Does anyone
> know how to fix the current plugin to get it work with 1.3.2?
>
> >>http://davecardwell.co.uk/javascript/jquery/plugins/jquery-minmax/
>
> Many thanks
> T.C.


[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread Stockypotty

Sorry I didn't mean that, early morning ^^

I was wondering if you had any good tutorials on how to put a unique
class name on each tab?

Unfortunately my site is not running live if that is what you meant
about a test page. However if you go to this site:

http://www.quizilla.com/

You can see that the top menu has pictures as the tabs, and then when
the user puts their mouse over it, the drop down menu appears. This is
what I hope to achieve!


[jQuery] Filter (attribute, value)

2009-08-14 Thread Geir

Hi!

Is this right syntax in my filter (line #3)
I can't seem to get what I want..

var path = location.href ;
var relPath = path.replace('http://mydomain.localhost', '') ||
path.replace('http://mydomain.com', '') ;
var here = $("#Navigation li a[href=''+relPath+'']")

I want "#Navigation li a"  with a href that matches current relative
path.
I've tried different combinations of quotes, but can't seem to get it
right..

..the or-statement in second line doesn't function either. Any short
solutions?

Thanks!


[jQuery] Getting class attributes??

2009-08-14 Thread Lyle

Hi,
  I need to be able to get the css attributes that a particular class
defines. Such that if I have a class called "SomeClass" I want to see
if it defines the attribute "position". I've tried using .css on an
element that has the class, but of course that picks up the defaults
and any inheritance.


Thanks in advance

Lyle


[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread amuhlou

I'm not sure what you mean by making the text "linkable"

Can you post a test page that demonstrates your questions?

thanks

On Aug 14, 7:28 am, Stockypotty  wrote:
> Yeah I was thinking of doing it the second way.
>
> So basically I would put a unique class name on each tab, then use
>
> background-image: url(linktophoto)
>
> Is there no way to make the text linkable?
>
> Also while I have you here, when I clicked on the suckerfish drop down
> and got sent to the new page, the title that was clicked still
> appeared. Do you know why?
>
> thanks


[jQuery] Re: Hover function issue

2009-08-14 Thread Geir

Thanks!
You're right, css is a good solution..

Thanks again!


[jQuery] Re: Can you put diffrent image son each of the tabs in suckerfish?

2009-08-14 Thread Stockypotty

Yeah I was thinking of doing it the second way.

So basically I would put a unique class name on each tab, then use

background-image: url(linktophoto)

Is there no way to make the text linkable?


Also while I have you here, when I clicked on the suckerfish drop down
and got sent to the new page, the title that was clicked still
appeared. Do you know why?

thanks


[jQuery] Re: Date range Picker jquery

2009-08-14 Thread bharani kumar
Hi Prashant ,

My option is like ,

single journey and return journey ,

I simply what i did know,

for the field is common for single and return journey, but when the single
is selected, on that time i disabled the return date,when i selec the return
journey on that time am enabled the return date,


My problem is , assume if the user going for return type journey ,

then they select the from date and return date, If they don't interest for
return journey , then they simply click the one way and then select date ..

Here is the problem ,,

This is link plz check it out ...

http://qa.ukatn.com/

the prob is .

USer cant select the date if they first go to return type process
Thanks ,,,

On Sun, Jun 28, 2009 at 9:13 PM, Prashant Khanal
wrote:

> hmmhave a look at the code below and its the one provided in that
> example:
>
> $(function()
> {
>   $('.date-pick').datePicker()
>   $('#start-date').bind(
>   'dpClosed',
>
>
>   function(e, selectedDates)
>   {
>   var d = selectedDates[0];
>   if (d) {
>   d = new Date(d);
>   $('#end-date').dpSetStartDate(.asString());
>   }
>   }
>   );
>   $('#end-date').bind(
>
>
>   'dpClosed',
>   function(e, selectedDates)
>   {
>   var d = selectedDates[0];
>   if (d) {
>   d = new Date(d);
>   
> $('#start-date').dpSetEndDate(d.addDays(-1).asString());
>   }
>   }
>
>
>   );
> });
>
> replace *d.addDays(1) and d.addDays(-1) *with just *d*. This will allow
> you to set same day as start date and end date if this is what you wanted.
>
> On Sun, Jun 28, 2009 at 4:19 PM, bharani kumar <
> bharanikumariyer...@gmail.com> wrote:
>
>> hi ,
>> y tried but cant changes its functionality ,
>>
>> Thanks
>>
>> On Sun, Jun 28, 2009 at 11:19 AM, Prashant Khanal <
>> prashantkha...@gmail.com> wrote:
>>
>>> you mean to say the problem is that you are not allowed to select the
>>> same day as the end date. That can be changed. If you check the source code
>>> provided and play a little with that code.
>>>
>>>
>>>
>>>
>>> On Sun, Jun 28, 2009 at 11:25 AM, bharani kumar <
>>> bharanikumariyer...@gmail.com> wrote:
>>>
 The plugin is fine , but u see ,some time my customer the journey may be
 one day,but its not possible in that plugin 

 thanks


 On Sun, Jun 28, 2009 at 9:01 AM, Prashant Khanal <
 prashantkha...@gmail.com> wrote:

> check this out
> this might help you
>
> http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePickerStartEnd.html
>
>
> On Sat, Jun 27, 2009 at 8:17 PM, bharani kumar <
> bharanikumariyer...@gmail.com> wrote:
>
>>
>>
>> Hi
>>
>> Tell the name of the plugin for
>> datePickers with start and end dates
>> Thanks
>>
>> B.S.Bharanikumar
>>
>>
>


 --
 Regards
 B.S.Bharanikumar
 http://php-mysql-jquery.blogspot.com/

>>>
>>>
>>
>>
>> --
>> Regards
>> B.S.Bharanikumar
>> http://php-mysql-jquery.blogspot.com/
>>
>
>


-- 
Regards
B.S.Bharanikumar
http://php-mysql-jquery.blogspot.com/


[jQuery] Re: Event click not fired by code added after the page is loaded

2009-08-14 Thread Felix

Ok, I answer myself as I founded the answer, in case it can help
someone:

instead of $(".addanswer").click(function(event){});, put:
$(".addanswer").live("click", function(){...});

On 14 août, 10:46, Felix  wrote:
> Hello,
>
> I have a page with a form, that represent questions and the
> corresponding answers.
> I defined the minimum questions, answers, and their maximum.
> So I added a link in the form to add question (along with the minimum
> amount of answers), and a link per question to add an answer in it.
>
> the "click" event for my links is like:
> $(document).ready(function(){
>   $(".addquestion").click(function(event){...});
>   $(".addanswer").click(function(event){alert("addanswer");...});});
>
> As I'm new to JQuery, the code look more like JS, but basically it
> adds the html code in the corresponding divs.
>
> The problem is the following:
> if I add a question, it also add a link to add answers to this
> question, but this link does not fire the event.
>
> Did I miss something to add to make it work?
> I mean the link in html page is exactly the same, I even tried not
> changing the part with the int, it still doesn't work.
>
> Thank you for your answers


[jQuery] problem with firewall

2009-08-14 Thread ifrastudio

when i using jQuery - I have no any problems, but I installed
Firewalls and it blocking jQuery scripts. It's big problem for me. Who
can help me?


[jQuery] Event click not fired by code added after the page is loaded

2009-08-14 Thread Felix

Hello,

I have a page with a form, that represent questions and the
corresponding answers.
I defined the minimum questions, answers, and their maximum.
So I added a link in the form to add question (along with the minimum
amount of answers), and a link per question to add an answer in it.

the "click" event for my links is like:
$(document).ready(function(){
  $(".addquestion").click(function(event){...});
  $(".addanswer").click(function(event){alert("addanswer");...});
});
As I'm new to JQuery, the code look more like JS, but basically it
adds the html code in the corresponding divs.

The problem is the following:
if I add a question, it also add a link to add answers to this
question, but this link does not fire the event.

Did I miss something to add to make it work?
I mean the link in html page is exactly the same, I even tried not
changing the part with the int, it still doesn't work.

Thank you for your answers


[jQuery] Suckerfish - Hidden behind another image

2009-08-14 Thread jellyfish458

I've tried this extension and it looks good.

I have set the menu into the header module to replace the original
menu, but it appears 'behind' the image that sits below in the same
module.

The original menu (suckerfish) works ok.

http://www.ttmarketingservices.com/gallies/

Any Ideas?

Regards

Jon


[jQuery] Tablesorter dates

2009-08-14 Thread badtant

Hi!

I'm using this plugin http://tablesorter.com/docs/ but have some
trouble with sorting my dates.
I want to have them show like this:
12 januari
29 januari
12 april
29 april
12 maj
29 maj

I've figured I probable need to write a new parser for this but I'm
not quite sure how. Anyone good at this that can help?

Thanks
Niklas


[jQuery] Re: Code inside click() event not firing.

2009-08-14 Thread Liam Potter


lol, niice.

Ricardo wrote:

wow

On Aug 13, 10:56 pm, "Meroe"  wrote:
  

What if you change

$("a").click(function ()

To
$("#a").click(function ()

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On

Behalf Of Patrick
Sent: Thursday, August 13, 2009 2:16 PM
To: jQuery (English)
Subject: [jQuery] Code inside click() event not firing.

New to jQuery, I did many searches before posting.

This is happening in both IE6 and Firefox 3.0.13.  I've gotten the
following script to work under strange circumstances (explained below
first snippet).

jQuery(document).ready(function(){
showHint("");  // ajax that fires onload, with no problem (but did
try taking it out with same results)
$("a").click(function () {
alert("hi onclick"); // stuck this in there but doesn't fire
either.
var avid;
avid = "#div" + $(this).attr("id");
alert(avid); // this won't work either.
$(avid).fadeIn("slow");
$(avid).css({display: block}); // added this extra when fadeIn
didn't work.
});

});

When I'm able to successfully get both the alert and the rest of the
script to work is when I add another alert in the ready() section.
Then, the code works for the rest of the browser session (even after
the 'ready ()' alert is removed).

jQuery(document).ready(function(){
showHint("");  // ajax/json
alert("hi on load"); // after inserting this, the below all works
**
$("a").click(function () {
alert("hi onclick"); // stuck this in there but doesn't fire.
var avid;
avid = $(this).attr("id");
avid = "#div" + avid;
alert(avid);
$(avid).fadeIn("slow");
$(avid).css({display: block}); // added this extra when fadeIn
didn't work.
});

});

Any clue why this would be happening?

Thanks,
Pat.





[jQuery] Re: Hello

2009-08-14 Thread Liam Potter


We need to see your code, goto http://www.jsbin.com, select the jquery 
library to include, paste your javascript and your html, then send us 
the link to see it.


Praveen Alvandi wrote:

Hey guys,

HELP ME . . .

I am struck. . .

On Thu, Aug 13, 2009 at 8:44 PM, Praveen Alvandi 
mailto:praveen.alva...@gmail.com>> wrote:


Hi,
I have this script here. Hope i can paste the code. Please click
on the login tab on the right side.
The issue is, the tab slides down as well as grows. Please help.
It should only slide down, not grow.

Please help me. 







[jQuery] Re: Validate groups of input fields, checkbox highlight and reset

2009-08-14 Thread hendra

i figure the 3rd problem. Here is the solution for those who has the
same problem:
- use type = reset
 Reset
- and then remove all classes
//reset form
$('#resetButton').click(function() {
$('li').removeClass('error');
$('li').removeClass('highlight');
$('li').removeClass('hovering');
});

Hope it helps...

I still haven't find the solution for problem 1 and 2. Please help. I
think it's because I am changing the parent ('li') when valid success
or valid failed, instead of the element itself. But I don't know how
to fix it...




On Aug 11, 12:29 am, hendra  wrote:
> Hi,
>
> I have 3 problems I need to solve:
>
> 1. Validate groups of input fields. I see in the example of tabs, you
> can do as follows:
>
>         // validate the other two selects when one changes to update the
> whole group
>         var birthdaySelects = $("#birthdateGroup select").click(function() {
>                 birthdaySelects.not(this).valid();
>         });
>
> However, mine is not using select, but it is using input text field.
> So I modify the code into:
>
>         // validate the other two inputs when one changes to update the whole
> group
>         var birthdayInputs = $("#birthdateGroup input").keyup(function() {
>                 birthdayInputs.not(this).valid();
>         });
>
> However, it is not working with the input fields. Please help to make
> it works.
>
> 2. Checkbox highlight. I am using a class highlight for all the
> errors. I use required checkbox, so at least 1 checkbox must be
> checked. If I check the first item, then uncheck, the error message
> appear and the error class highlight also successfully displayed.
> However, if I check the second or the third (etc) item, then uncheck,
> only the error msg appear, the error class doesn't highlight. Here is
> my code:
>
>                 highlight: function( element, errorClass, validClass  ) {
>                         
> $(element).parents('li').addClass(errorClass).removeClass
> (validClass);
>                 },
>                 unhighlight: function( element, errorClass, validClass  ) {
>                         
> $(element).parents('li').removeClass(errorClass).addClass
> (validClass);
>                 },
>
> 3. Reset function not working. Here is my code:
>
>         var v = $('.myForm').validate({  bla... bla ... bla});
>
>         $('#resetButton').click(function() {
>                 v.resetForm();
>         });
>
> I figure this is caused by I am using a highlight class (see item 2
> above).
>
> Please help me to find the solution for this. I am still learning
> Jquery, but I do find it very useful.
> THanks in advance for all the help.


[jQuery] Re: Code inside click() event not firing.

2009-08-14 Thread Ricardo

wow

On Aug 13, 10:56 pm, "Meroe"  wrote:
> What if you change
>
>     $("a").click(function ()
>
> To
>     $("#a").click(function ()
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
>
> Behalf Of Patrick
> Sent: Thursday, August 13, 2009 2:16 PM
> To: jQuery (English)
> Subject: [jQuery] Code inside click() event not firing.
>
> New to jQuery, I did many searches before posting.
>
> This is happening in both IE6 and Firefox 3.0.13.  I've gotten the
> following script to work under strange circumstances (explained below
> first snippet).
>
> jQuery(document).ready(function(){
>     showHint("");  // ajax that fires onload, with no problem (but did
> try taking it out with same results)
>     $("a").click(function () {
>         alert("hi onclick"); // stuck this in there but doesn't fire
> either.
>         var avid;
>         avid = "#div" + $(this).attr("id");
>         alert(avid); // this won't work either.
>         $(avid).fadeIn("slow");
>         $(avid).css({display: block}); // added this extra when fadeIn
> didn't work.
>     });
>
> });
>
> When I'm able to successfully get both the alert and the rest of the
> script to work is when I add another alert in the ready() section.
> Then, the code works for the rest of the browser session (even after
> the 'ready ()' alert is removed).
>
> jQuery(document).ready(function(){
>     showHint("");  // ajax/json
>     alert("hi on load"); // after inserting this, the below all works
> **
>     $("a").click(function () {
>         alert("hi onclick"); // stuck this in there but doesn't fire.
>         var avid;
>         avid = $(this).attr("id");
>         avid = "#div" + avid;
>         alert(avid);
>         $(avid).fadeIn("slow");
>         $(avid).css({display: block}); // added this extra when fadeIn
> didn't work.
>     });
>
> });
>
> Any clue why this would be happening?
>
> Thanks,
> Pat.