[jQuery] problems with filter() a variable ajax response

2009-04-03 Thread Mathew

I ma having trouble with this for a few hours and thought id post to
see if i can get help.
I am trying to use ajax to load an element from another page. i can
see the response and the id element i am looking for inside but i can
get nothing but a null value trying to extract the html()
im using variations of this:
jQuery.ajax({

url: 'index.php?
option=com_resource&view=list&category_id=9&user_id=64&layout=useritems&view_what=created&Itemid=0',

timeout: 0,

error: function() {

  console.log("Failed to submit");

},

success: function(lt) {

  //alert(r);
var ltm = jQuery(lt);
var cone = ltm.filter("#jsc_leftbody").html();
jQuery("#contentPut").html(''+cone+'');
alert(cone);


}

  });


i dont know why but i always gets null vlaue anyone know why?
thanks a bunch


[jQuery] Re: Selectively load js files

2009-04-03 Thread Jack Killpatrick
cool little chunk of code, thanks for sharing. I did something like this 
for sets of trimpath templates (js/html templates), never thought to do 
it for scripts. Nice.


- Jack

Eric Garside wrote:

If you get the developer build, each of the files is separated out
into a: ui.core.js, ui.draggable.js, etc format. If you want to add a
bit of spice:

$.uinclude = function(){
var scripts = ['core'], counter, loaded = 0;
scripts.push.apply(this, arguments);
counter = scripts.length;
$.each(scripts, function(){ $.ajax({ type: "GET", url: '/path/to/
jqueryui/ui.' + this + '.js', success: function(){ loaded++; if
(loaded == counter) $('body').trigger('ui-included'); }, dataType:
"script", cache: true });
}
// Example Usage
$('body').bind('ui-included', function(){
// Triggered when your UI scripts are included
});

$.uinclude('draggable', 'resizable', 'tabs');

On Apr 3, 1:36 pm, Brendan  wrote:
  

Hi,

I'm looking at including jQuery UI in a project I am working on, but
one of my concerns is the large size of the full file.

I was wondering if there is something easy or built in that would
allow me to load only which jQuery UI plugins/effects I need on a
particular page.

So, something like:

loadUI({"core","accordion"});

Does that make sense? And each file would be separate on the server,
so they get cached. (like individual 

[jQuery] Re: Get text of external HTML and encode

2009-04-03 Thread Nikola

Perfect.  Thank you, I did try using a $.get request but I was tyring
to replace charecters instead of injecting the data as text.  This is
exactly what I was trying to do.  I thought there was a very simple
and clean way to do it but I wasn't sure how.  Thank you much!

On Apr 4, 12:08 am, Abdullah Rubiyath  wrote:
> Hi There,
>
> If I am getting this right.. you are trying to get the contents of
> another file and inject it into an element, but ensuring it shows as
> plain text and javascripts are not executed.
>
> Can you try replacing $('#thisDiv').load with a $.get request and do
> the following:
>
> $.get('../sample.html', function(data) {
>    $('#thisDiv').text( data );
>
> });
>
> With this approach,  the html entities (<,&,> etc.) will be converted
> to their appropriate characters and then injected to $('#thisDiv').
>
> I hope this helps,
>
> Thanks,
> Abdullah.
>
> On Apr 3, 11:27 pm, Nikola  wrote:
>
>
>
> > Anyone have any ideas or input on this one?
>
> > On Apr 3, 6:29 pm, Nikola  wrote:
>
> > > Thanks MorningZ, I gave this approach whirl and in a roundabout sort
> > > of way it seems to accomplish the same thing I was doing in my third
> > > example.
>
> > > $("#thisDiv").load("../sample.html", { }, function() {
> > >     var div = document.createElement("div");
> > >     var text = document.createTextNode($("#thisDiv").html());
> > >     div.appendChild(text);
> > >     var EscapedHTML = div.innerHTML;
> > >     $("#thisDiv").text(EscapedHTML);
>
> > > });
>
> > > In a nutshell I want to display the text of an HTML file as plain
> > > text. I'm able to do this, with HTML, but I'm unable to prevent the
> > > javascipt in the HTML from executing.  My goal is to write a simple
> > > function that loads code from a document and displays it as text.- Hide 
> > > quoted text -
>
> - Show quoted text -


[jQuery] Re: Selectively load js files

2009-04-03 Thread Nikola

What a great example, very usefull!  I never thought of doing
something like that...

On Apr 3, 11:44 pm, Eric Garside  wrote:
> If you get the developer build, each of the files is separated out
> into a: ui.core.js, ui.draggable.js, etc format. If you want to add a
> bit of spice:
>
> $.uinclude = function(){
>     var scripts = ['core'], counter, loaded = 0;
>     scripts.push.apply(this, arguments);
>     counter = scripts.length;
>     $.each(scripts, function(){ $.ajax({ type: "GET", url: '/path/to/
> jqueryui/ui.' + this + '.js', success: function(){ loaded++; if
> (loaded == counter) $('body').trigger('ui-included'); }, dataType:
> "script", cache: true });}
>
> // Example Usage
> $('body').bind('ui-included', function(){
>     // Triggered when your UI scripts are included
>
> });
>
> $.uinclude('draggable', 'resizable', 'tabs');
>
> On Apr 3, 1:36 pm, Brendan  wrote:
>
>
>
> > Hi,
>
> > I'm looking at including jQuery UI in a project I am working on, but
> > one of my concerns is the large size of the full file.
>
> > I was wondering if there is something easy or built in that would
> > allow me to load only which jQuery UI plugins/effects I need on a
> > particular page.
>
> > So, something like:
>
> > loadUI({"core","accordion"});
>
> > Does that make sense? And each file would be separate on the server,
> > so they get cached. (like individual 

[jQuery] Re: Get text of external HTML and encode

2009-04-03 Thread Abdullah Rubiyath

Hi There,

If I am getting this right.. you are trying to get the contents of
another file and inject it into an element, but ensuring it shows as
plain text and javascripts are not executed.

Can you try replacing $('#thisDiv').load with a $.get request and do
the following:

$.get('../sample.html', function(data) {
   $('#thisDiv').text( data );
});

With this approach,  the html entities (<,&,> etc.) will be converted
to their appropriate characters and then injected to $('#thisDiv').

I hope this helps,

Thanks,
Abdullah.



On Apr 3, 11:27 pm, Nikola  wrote:
> Anyone have any ideas or input on this one?
>
> On Apr 3, 6:29 pm, Nikola  wrote:
>
> > Thanks MorningZ, I gave this approach whirl and in a roundabout sort
> > of way it seems to accomplish the same thing I was doing in my third
> > example.
>
> > $("#thisDiv").load("../sample.html", { }, function() {
> >     var div = document.createElement("div");
> >     var text = document.createTextNode($("#thisDiv").html());
> >     div.appendChild(text);
> >     var EscapedHTML = div.innerHTML;
> >     $("#thisDiv").text(EscapedHTML);
>
> > });
>
> > In a nutshell I want to display the text of an HTML file as plain
> > text. I'm able to do this, with HTML, but I'm unable to prevent the
> > javascipt in the HTML from executing.  My goal is to write a simple
> > function that loads code from a document and displays it as text.


[jQuery] Re: How to wait for getJSON to complete before continue?

2009-04-03 Thread iceangel89

i still will not be able to return false to cancel form submission if
the entry does not validates right?

On Mar 30, 9:50 pm, Joseph Le Brech  wrote:
> .getJSON("url", function_name(json) {});
>
> /* elsewhere */
>
> function function_name(json){
>
> }
>
> _
> View your Twitter and Flickr updates from one place – Learn 
> more!http://clk.atdmt.com/UKM/go/137984870/direct/01/


[jQuery] Re: How to wait for getJSON to complete before continue?

2009-04-03 Thread iceangel89

i still will not be able to return false to cancel form submission if
the entry does not validates right?

On Mar 30, 9:50 pm, Joseph Le Brech  wrote:
> .getJSON("url", function_name(json) {});
>
> /* elsewhere */
>
> function function_name(json){
>
> }
>
> _
> View your Twitter and Flickr updates from one place – Learn 
> more!http://clk.atdmt.com/UKM/go/137984870/direct/01/


[jQuery] Re: Selectively load js files

2009-04-03 Thread Eric Garside

If you get the developer build, each of the files is separated out
into a: ui.core.js, ui.draggable.js, etc format. If you want to add a
bit of spice:

$.uinclude = function(){
var scripts = ['core'], counter, loaded = 0;
scripts.push.apply(this, arguments);
counter = scripts.length;
$.each(scripts, function(){ $.ajax({ type: "GET", url: '/path/to/
jqueryui/ui.' + this + '.js', success: function(){ loaded++; if
(loaded == counter) $('body').trigger('ui-included'); }, dataType:
"script", cache: true });
}
// Example Usage
$('body').bind('ui-included', function(){
// Triggered when your UI scripts are included
});

$.uinclude('draggable', 'resizable', 'tabs');

On Apr 3, 1:36 pm, Brendan  wrote:
> Hi,
>
> I'm looking at including jQuery UI in a project I am working on, but
> one of my concerns is the large size of the full file.
>
> I was wondering if there is something easy or built in that would
> allow me to load only which jQuery UI plugins/effects I need on a
> particular page.
>
> So, something like:
>
> loadUI({"core","accordion"});
>
> Does that make sense? And each file would be separate on the server,
> so they get cached. (like individual 

[jQuery] Re: Get text of external HTML and encode

2009-04-03 Thread Nikola

Anyone have any ideas or input on this one?

On Apr 3, 6:29 pm, Nikola  wrote:
> Thanks MorningZ, I gave this approach whirl and in a roundabout sort
> of way it seems to accomplish the same thing I was doing in my third
> example.
>
> $("#thisDiv").load("../sample.html", { }, function() {
>     var div = document.createElement("div");
>     var text = document.createTextNode($("#thisDiv").html());
>     div.appendChild(text);
>     var EscapedHTML = div.innerHTML;
>     $("#thisDiv").text(EscapedHTML);
>
> });
>
> In a nutshell I want to display the text of an HTML file as plain
> text. I'm able to do this, with HTML, but I'm unable to prevent the
> javascipt in the HTML from executing.  My goal is to write a simple
> function that loads code from a document and displays it as text.


[jQuery] Re: effect similar to windows task bar in auto-hide mode

2009-04-03 Thread Nikola

Check out the amazing jQuery UI Layout plugin.  Go through the demos,
I'm sure you can keep the south pane hidden and then show it on
hover.  Conversly, you could always use a fixed position DIV at the
bottom of the page, hide it and then on hover use something like
slideUp to show it..

jQuery UI Layout - a really well thoughtout PlugIn (great for Control
Panels as well)
http://layout.jquery-dev.net/

On Apr 3, 1:41 pm, sso  wrote:
> Hi
> I'm looking for a quick and easy way to have an effect similar to that
> of the windows taskbar in auto-hide mode.  It would be especially nice
> if it stayed at the bottom of the page even while scrolling.
>
> Suggestions?


[jQuery] Superfish 1.4.8

2009-04-03 Thread spinozagl

Is it possible to keep the second level on the nav-bar visible when
one of the listitems has the 'current' class associated with it.


[jQuery] trying to use kiketables to call individual table id

2009-04-03 Thread dkaplan73

hi,

trying to use kiketables to stretch and collapse an individual table.
This doesn't work:


$("#table_sometable")
.eq(0)
.kiketable_colsizable({
fixWidth :  true,
dragOpacity :   0,
dragMove : true,
dragProxy : "area",
//onLoad : fnOnLoad
})
.end()

;

Any help would be appreciated!

David Kaplan


[jQuery] not working in IE.

2009-04-03 Thread Jake Weary

Hi. I'm new to JQuery.
We have a system that dynamically generates pages from the database.
The users want some of the pages changed.
I'm trying to use JQuery to modify the pages on the fly so I don't
have to mess with the vendor's code.
below is my code as I'm just starting out.
It works perfectly for Firefox and Chrome, however, none of the
changes appear in IE.
I don't know where to start debugging this thing.
Please help.


$(document).ready(function() {

/*
 *  Mods that Apply to All Pages
*
 
*/
// remove the Not Reported radio buttons
//---
$('input[id*=NOT_REPORTED]').each(function(){
var $thisButton = $(this);

// copy everything except the text nodes
var $nodeKids = $thisButton.parent().children();

// then paste again overwriting everything including text nodes
$thisButton.parent().html($nodeKids);

// replace the text nodes
$thisButton.parent().children('label:nth(0)').before(' Yes ');
$thisButton.parent().children('label:nth(1)').before(' No ');

// remove the buttons
$thisButton.next().remove();
$thisButton.remove();
});

// remove the No Response radio buttons
//---
$('input[id*=notrep_id]').each(function(){
var $thisButton = $(this);

// copy everything except the plaintext nodes
var $nodeKids = $thisButton.parent().children();

// then paste again overwriting everything including text nodes
$thisButton.parent().html($nodeKids);

// replace text nodes
$thisButton.parent().children('label:nth(0)').before(' Yes ');
$thisButton.parent().children('label:nth(1)').before(' No ');

// remove the buttons
$thisButton.next().remove();
$thisButton.remove();
});


/*
 *  Page Specific Modifications
*
 
*/
switch ($('title').text()) {

// bwskaper.P_DispAppPersonal
case 'Personal Information':
{
// remove the (xxx) from the SS label
$('acron...@title=nine digit format]').remove();
break;
}
// bwskwpro.P_WebProspectMain
case 'Inquiry Form':
{
// remove prefix field row
$('#prefix_id').parent().remove();

// remove suffix field row
$('#suf_id').parent().remove();

// remove nickname field row
$('#nick_id').parent().remove();

// remove "valid from" and "valid until" rows
$('td[id*=vf_id]').parent().remove();
$('td[id*=vu_id]').parent().remove();

// remove county rows
$('td[id*=cnty_id]').parent().remove();

// remove the Int'l Access Code rows
$('input[name*=ext_in]').remove();

// replace 'xxx' labels for telephone fields with 
something that
makes sense
$('input[id*=pn_id]').each(function(){
var $thisField = $(this);
var $nodeKids = $thisField.parent().children();
$thisField.parent().html($nodeKids);

$thisField.parent().children('input:last-child').after('
555-1234567');
});

// remove the extension fields (remove the entire row)
$('td[id*=iac_id]').parent().remove();

// change 'Nation' label to 'Country'
$('td[id*=natn_id]').text('Country:');

// baseline "How I Learned" label has a bug, replace 
content
$('#hil_id').text('How I Learned About Biola 
University');
}
}

}); // end $(document).ready()



[jQuery] Superfish Levels

2009-04-03 Thread spinozagl

How to ensure that in the navbar style menu the second level ul
remains visible to show the second level selected item. This item and
its parent are in the current path.


[jQuery] effect similar to windows task bar in auto-hide mode

2009-04-03 Thread sso

Hi
I'm looking for a quick and easy way to have an effect similar to that
of the windows taskbar in auto-hide mode.  It would be especially nice
if it stayed at the bottom of the page even while scrolling.

Suggestions?


[jQuery] DOM Rendering is not finished before ThickBox tried to display = Grey Screen

2009-04-03 Thread Jim D

Hi. I have a problem of getting a "grey screen" instead of grey screen
with JQuery ThickBox on top of that.
I need to open ThickBox on page load.
It seems that sometimes! DOM is not finished when ThickBox is trying
to modify it.

Here is a code I have at the end of my .jsp file (showWarning() just
opens a ThickBox)



formElement = document.shippingRulesArrayForm;
window.onLoad=window.setTimeout("showWarning()", 1400);


Note: even if I put this code in footer, it still sometimes gives a
grey screen.


[jQuery] Superfish Firefox Problem: No Show

2009-04-03 Thread anole

The site below has a vertical superfish jquery menu that was working
fine in FF and IE when I last posted it.

Today, I re-arranged the menu items, and I'm not getting any of the
fly-out s in Firefox only.  Hovering just gives me the mouse-over
color changes for the element itself.  I don't know if the re-
arranging of the menu items did it, though, because some pages that
have not changed are no longer working.

I know the commented-out sections of the menu are sloppy, but there is
a lot of information pending that I didn't want to start from scratch
on.  Sorry.  And it *was* working - even with this mess - until
recently.

Anyone have any ideas as to where to look?

Thank you in advance...


[jQuery] dynamically reload your data in json (for categorical filtering)

2009-04-03 Thread craig mcrae, interactive developer @ roundarch

What's going on here?

We're pulling in a json object with all of our data (itemListMaster)
and keeping a record of it to parse data from later and populate our
default json object (itemList). I'll comment in the code below to
explain what's going on.

### the code ###


var mycarousel_itemListMaster = [...]; //pull in/assign the data here
var mycarousel_itemList = [...]; //same as above
var carouselObj;//global object for your carousel

//this is the function we will be using to reload our carousel with
new data
function reloadCarousel(myCatCode){
mycarousel_itemList = []; //clear out the array
var jQList = mycarousel_itemListMaster; //get the number of items
from the master list to iterate through in order to find a matching
category

var counter = 0;
for(var i = 0; i < jQList.length; i++){
if (mycarousel_itemListMaster[i].catCode == myCatCode){ //check 
for
match in array with category code
mycarousel_itemList[counter] = 
mycarousel_itemListMaster[i]; //once
a match is found add it to your new array
counter++;
}
}

carouselObj.reset(); // reset the carousel object with the new data
}

//this is where we assign the carousel object to our new global
variable
function mycarousel_initCallback(carousel)
{
carouselObj = carousel;
}


jQuery(document).ready(function() {
jQuery('#mycarousel').jcarousel({
wrap: 'circular',
initCallback: mycarousel_initCallback,
itemVisibleInCallback: {onBeforeAnimation:
mycarousel_itemVisibleInCallback},
itemVisibleOutCallback: {onAfterAnimation:
mycarousel_itemVisibleOutCallback}
});

reloadCarousel(mycarousel_itemListMaster[0].catCode); //we add
this line to the default code in order to display the content related
to the first category in our list of categories. you can remove this
to display all of your content on the initial load.
});


[jQuery] [treeview] nodes in firefox 3 won't collapse

2009-04-03 Thread Joseph Cocco

some basic info:
jQuery: 1.3.2
Plugin: Jörn Zaefferer's Treeview plugin (1.4.1)
coding with asp.net c#

We are building out the HTML for the treeview in the codebehind, and
then adding it to the innerHTML of a UL already on the page.  This has
not given us any issues in IE.  The treeview renders perfectly, there
are no issues with expanding and collapsing nodes.

However, in Firefox 3, nodes will expand, but not collapse.  I did
some digging, and noticed the height of the UL was 0px.  So I set the
height of the UL to 1px (just to give it a non zero value), and
collapsing then worked fine in FF.  But then I went back to IE, and
now all the text is on top of each other because I set the height of
the UL to 1px.

I know Treeview works in FF, because I saw it working in the demos.  I
have also tried this with a list already in the markup, thinking there
was a problem with creating the HTML in the code behind, but I get the
same results.

Hopefully this explanation is clear.  If you guys need any more
information, let me know.  I really appreciate the help...  Thanks!


[jQuery] Closing Ajax Requests

2009-04-03 Thread Sam

I couldn't find anything on this in the jQuery documentation. Is there
a way to close all jQuery ajax requests? I've built a bit of comet-
like long polling ajax script, but it seems as though Internet
Explorer is keeping these long polling requests open when I refresh or
redirect to another page. Sense IE has a 2 connections per domain
limit, the client would have to wait till the long polling is complete
(which takes roughly 1 minute) before the other pages load. So what I
need is a way to stop all ajax requests so I can place it in a
onbeforeunload event.

Anyone know of a way that I can stop all jQuery ajax requests?


[jQuery] Re: Superfish Firefox Problem: No Show

2009-04-03 Thread SP
Sorry - forgot the URL:

http://www.bluewaterpromo.com



On Fri, Apr 3, 2009 at 12:43 PM, anole  wrote:

> The site below has a vertical superfish jquery menu that was working
> fine in FF and IE when I last posted it.
>
> Today, I re-arranged the menu items, and I'm not getting any of the
> fly-out s in Firefox only.  Hovering just gives me the mouse-over
> color changes for the element itself.  I don't know if the re-
> arranging of the menu items did it, though, because some pages that
> have not changed are no longer working.
>
> I know the commented-out sections of the menu are sloppy, but there is
> a lot of information pending that I didn't want to start from scratch
> on.  Sorry.  And it *was* working - even with this mess - until
> recently.
>
> Anyone have any ideas as to where to look?
>
> Thank you in advance...
>


[jQuery] How to get Superfish to display outside frameset boundary

2009-04-03 Thread DaveT

I am developing a horizontal menu bar using Superfish. I have
configured it using a simple file, no problems, now I am trying to
integrate it into my site.

The site uses frames (can't get around it) for a header, TOC, body.
The menu bar is in the top "header" frame, right at the bottom of the
frame.

Unfortunately, the Superfish menu popup does not appear because it is
"cut off" or clipped by the frame it's in. I tried the bgiframe plugin
in hopes it would work, but it didn't (probably not what it's for I
guess).

So is there any way to make a menu like this to display over its frame
boundaries?

Appreciate any help!

-dave


[jQuery] A silly question from a newbie

2009-04-03 Thread Yuzem


Hello.
I have a page that loads another page and I want to change the height of an
element in that other page:

$(document).ready(function(){
$("#page").load("page");
$("#main").css("height","111px")
});


That doesn't work, #main is inside #page.

Thanks in advance!
-- 
View this message in context: 
http://www.nabble.com/A-silly-question-from--a-newbie-tp22878466s27240p22878466.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Thank you John Resig

2009-04-03 Thread Geuis

I just want to say, thank you John. I have been developing sites with
jQuery for the better part of a year and it has just made the amount
of work I can get done sky rocket. Now, however, I just started a new
job this week and they are using YUI.

I have been patient and have spent the better part of 5 days trying to
do the most basic things the YUI-way and I'm falling flat on my damned
face. I have actually resorted to writing code using basic DOM api
functions simply because YUI is so frakking hard to use. Their
documentation is all over the map. They have multiple sub-libraries to
do the most basic thing like DOM selections and manipulation. Should I
be using YAHOO.util.Selector, or YAHOO.util.Dom.get, or
YAHOO.util.Element.getByElementId( or TagNames, or ClassNames).
CHRIST!

oh, the joy of $('#my id, .someclass, div>p)

I think people that insist on their work being hard must be aliens.
That's about the only explanation that I can come up with.

Good god, are there any ex-YUI people that found the goodness of
jQuery that can point me at a coherent tutorial for this pile of crap
called YUI?


[jQuery] fade effect not working in IE

2009-04-03 Thread bgthomson

Hi,
When I load the following jquery, the load effect collapses in IE. You
can see what I mean here: http://m1.cust.educ.ubc.ca/. The buttons in
the middle of the page are supposed to load new content.

Any ideas what's wrong?

 $(document).ready(function(){

q1 = {
init: function() {
$(".loader1").click(function() {
$("#fader").fadeOut('slow', function() {
$(this).load('homepage_text/
0.php').fadeIn('slow');
});
$("#featureBanner").fadeOut('slow', function()
{
$(this).load('homepage_images/
0.php').fadeIn('slow');
});
$("#over").css({color: 'white',
backgroundColor: '#2e4468',
textDecoration: 'underline'});
$("#other").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});
$("#other2").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});
$("#other3").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});
});
}
}

q1.init();
q2 = {
init: function() {
$(".loader2").click(function() {
$("#fader").fadeOut('slow', function() {
$(this).load('homepage_text/
1.php').fadeIn('slow');
});
$("#featureBanner").fadeOut('slow', function()
{
$(this).load('homepage_images/
1.php').fadeIn('slow');
});
$("#over").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});
$("#other").css({color: 'white',
backgroundColor: '#2e4468',
textDecoration: 'underline'});
$("#other2").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});
$("#other3").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});

});
}
}

q2.init();

q3 = {
init: function() {
$(".loader3").click(function() {
$("#fader").fadeOut('slow', function() {
$(this).load('homepage_text/
2.php').fadeIn('slow');
});
$("#featureBanner").fadeOut('slow', function()
{
$(this).load('homepage_images/
2.php').fadeIn('slow');
});
$("#over").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});
$("#other").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});
$("#other2").css({color: 'white',
backgroundColor: '#2e4468',
textDecoration: 'underline'});
$("#other3").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});
});
}
}

q3.init();

q4 = {
init: function() {
$(".loader4").click(function() {
$("#fader").fadeOut('slow', function() {
$(this).load('homepage_text/
3.php').fadeIn('slow');
});
$("#featureBanner").fadeOut('slow', function()
{
$(this).load('homepage_images/
3.php').fadeIn('slow');
});
$("#over").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});
$("#other").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});
$("#other2").css({color: '#242f37',
backgroundColor: '#A4BEDF',
textDecoration: 'none'});
$("#other3").css({color: 'white',
backgroundColor: '#2e4468',
textDecoration: 'underline'});
});
}
}

q4.init();


[jQuery] Re: Is there a way to get a link to submit like a button?

2009-04-03 Thread Rick Faircloth
Well.it's a little complicated in that the form submission is interrupted

by jQuery code which generates an iframe on the calling page, then

the post is to a cfc method which processes and image and the data

and sends that data back to be added to a div.

 

It's the "upload and view a file via ajax utilizing an iframe" bit.

 

The initial form on the calling page isn't actually submitted, but has the

method and other attributes added by the jQuery.  The method of the

form is "post", and a button works fine, but the link won't cause the

processing to occur properly.  I've worked this all the ways I can think

of, but can't get that link to cause the process to occur properly.

 

Maybe just the simple addition of "return false;" will cure the problem.

I had that in one iteration, but took it back out.

 

I'll try it again.

 

Thanks, Charlie.

 

Rick

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Charlie Griefer
Sent: Friday, April 03, 2009 6:50 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Is there a way to get a link to submit like a button?

 

On Fri, Apr 3, 2009 at 3:15 PM, Rick Faircloth 
wrote:

I'd prefer to use a link, rather than a button, but I can't get the

link to submit a form in the same way a button does.

 

I think it's that the link is using "get" instead of "post", but I don't

know how to force it.

 

If your  tag has a method="post" attribute, adding a
('#myForm').submit() to the click event of the link should submit the form
via post.  Don't forget to return false; to prevent the default link
behavior (attempting to follow the link) 

 

-- 

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



[jQuery] Re: Is there a way to get a link to submit like a button?

2009-04-03 Thread Charlie Griefer
On Fri, Apr 3, 2009 at 3:15 PM, Rick Faircloth wrote:

>  I’d prefer to use a link, rather than a button, but I can’t get the
>
> link to submit a form in the same way a button does.
>
>
>
> I think it’s that the link is using “get” instead of “post”, but I don’t
>
> know how to force it.
>

If your  tag has a method="post" attribute, adding a
('#myForm').submit() to the click event of the link should submit the form
via post.  Don't forget to return false; to prevent the default link
behavior (attempting to follow the link)

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


[jQuery] Re: Get text of external HTML and encode

2009-04-03 Thread Nikola

Thanks MorningZ, I gave this approach whirl and in a roundabout sort
of way it seems to accomplish the same thing I was doing in my third
example.

$("#thisDiv").load("../sample.html", { }, function() {
var div = document.createElement("div");
var text = document.createTextNode($("#thisDiv").html());
div.appendChild(text);
var EscapedHTML = div.innerHTML;
$("#thisDiv").text(EscapedHTML);
});

In a nutshell I want to display the text of an HTML file as plain
text. I'm able to do this, with HTML, but I'm unable to prevent the
javascipt in the HTML from executing.  My goal is to write a simple
function that loads code from a document and displays it as text.


[jQuery] Is there a way to get a link to submit like a button?

2009-04-03 Thread Rick Faircloth
I'd prefer to use a link, rather than a button, but I can't get the

link to submit a form in the same way a button does.

 

I think it's that the link is using "get" instead of "post", but I don't

know how to force it.

 

Suggestions?

 

Thanks,

 

Rick

 


---

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

 



[jQuery] Re: Get text of external HTML and encode

2009-04-03 Thread Nikola

Thanks MorningZ,  I gave this approach whirl and in a roundabout sort
of way it seems to accomplish the same thing I was doing in my third
example.

$("#thisDiv").load("../sample.html", { }, function() {
var div = document.createElement("div");
var text = document.createTextNode($("#thisDiv").html());
div.appendChild(text);
var EscapedHTML = div.innerHTML;
$("#thisDiv").text(EscapedHTML);
});

In a nutshell I want to display the text of an HTML as plain text. I'm
able to do this, with HTML, but I'm unable to prevent the js in the
HTML from executing.  My goal is to write a simple function to load
code snippets directly from their parent document.

On Apr 3, 5:27 pm, MorningZ  wrote:
> Does the ".load()" at least work?
>
> -  Your first method -
> $("#thisDiv").text("<").replaceWith("<");
>
> that's going to fill "#thisDiv" with "<"
>
> -  Your second method ---
> $("#thisDiv").text().html();
>
> is going to be a string value after ".text()" and would throw an error
> because there is no ".html()" method on a string object
>
> - Your third attempt ---
> Would have worked, except you are missing the fact that the ".load"
> call is an asynchronous call, meaning you have no control over the
> object so soon to use the ".html()" method
>
> So with all that said (with help of some "Html Encode" code that i
> found by Google-ing):
>
> $("#thisDiv").load("../sample.html", { }, function() {
>     var div = document.createElement("div");
>     var text = document.createTextNode($("#thisDiv").html());
>     div.appendChild(text);
>     var EscapedHTML = div.innerHTML;
>
> });
>
> On Apr 3, 5:05 pm, Nikola  wrote:
>
>
>
> > Hello,
>
> > I'm trying to load an external HTML file and encode the < with <.
>
> > I've tried a number of different approaches but I haven't found the
> > proper method yet. Here are a few examples of how I've approached
> > this..
>
> > $("#thisDiv").load("../sample.html");
> > $("#thisDiv").text("<").replaceWith("<");
> > __
>
> > $("#thisDiv").load("../sample.html").text();
> > $("#thisDiv").text().html();
> > __
>
> > $("#thisDiv").load("../sample.html").text();
> > $("#thisDiv").text().replace(/
> > Any suggestions or ideas?- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: jQuery and Ruby on Rails

2009-04-03 Thread Matt Quackenbush
jQuery is client side.  Ruby is server side.  jQuery (or any JavaScript) is
completely incapable of setting a Ruby (or any server-side language)
variable.  However, you can use jQuery's $.ajax() method to send an
asynchronous request to the server, passing along the variable value.  Check
the jQuery docs for details on the $.ajax() method.


[jQuery] Re: Plugin search

2009-04-03 Thread Jack Killpatrick


this might work:

http://layout.jquery-dev.net/demos.html

- Jack

ripple...@yahoo.com wrote:

I have been searching for a jquery plugin that has a similar feature
to ext.js and the Border Layout that can scale and or collapse a div
on click or drag, while scaling the right larger div, see it here
(Left Nav)  
http://extjs.com/deploy/dev/examples/layout-browser/layout-browser.html




  





[jQuery] Re: Get text of external HTML and encode

2009-04-03 Thread MorningZ

Does the ".load()" at least work?

-  Your first method -
$("#thisDiv").text("<").replaceWith("<");

that's going to fill "#thisDiv" with "<"


-  Your second method ---
$("#thisDiv").text().html();

is going to be a string value after ".text()" and would throw an error
because there is no ".html()" method on a string object


- Your third attempt ---
Would have worked, except you are missing the fact that the ".load"
call is an asynchronous call, meaning you have no control over the
object so soon to use the ".html()" method

So with all that said (with help of some "Html Encode" code that i
found by Google-ing):

$("#thisDiv").load("../sample.html", { }, function() {
var div = document.createElement("div");
var text = document.createTextNode($("#thisDiv").html());
div.appendChild(text);
var EscapedHTML = div.innerHTML;
});



On Apr 3, 5:05 pm, Nikola  wrote:
> Hello,
>
> I'm trying to load an external HTML file and encode the < with <.
>
> I've tried a number of different approaches but I haven't found the
> proper method yet. Here are a few examples of how I've approached
> this..
>
> $("#thisDiv").load("../sample.html");
> $("#thisDiv").text("<").replaceWith("<");
> __
>
> $("#thisDiv").load("../sample.html").text();
> $("#thisDiv").text().html();
> __
>
> $("#thisDiv").load("../sample.html").text();
> $("#thisDiv").text().replace(/
> Any suggestions or ideas?


[jQuery] Get text of external HTML and encode

2009-04-03 Thread Nikola

Hello,

I'm trying to load an external HTML file and encode the < with <.

I've tried a number of different approaches but I haven't found the
proper method yet. Here are a few examples of how I've approached
this..

$("#thisDiv").load("../sample.html");
$("#thisDiv").text("<").replaceWith("<");
__

$("#thisDiv").load("../sample.html").text();
$("#thisDiv").text().html();
__

$("#thisDiv").load("../sample.html").text();
$("#thisDiv").text().replace(/

[jQuery] Re: ajaxForm + IE + file upload + you

2009-04-03 Thread Pappy

Ah.  That makes sense.  I admit I skimmed the code and interpolated :)

On Apr 3, 11:30 am, Mike Alsup  wrote:
> > When ajaxForm submits a form that has a file, it opens an iframe,
> > copies your filled-in form to the iframe, submits the form *in the
> > iframe*, then copies the response back to you.  Very nice.
>
> That's not quite how it works.  Nothing is copied to the iframe.  The
> original form is submitted via a normal browser submit by invoking the
> submit function on the form element (ie:  formElement.submit() ).  The
> response is directed to a dynamically created iframe by adding a
> "target" attribute to the form before it is submitted.  There is some
> pre and post processing around all of this, but essentially that's how
> it works.
>
> Mike


[jQuery] Re: All div content showing up in jQuery Tabs

2009-04-03 Thread Klaus Hartl

On 3 Apr., 20:12, expresso  wrote:
> now I have to figure out how to get rid of these imposed styles.

As already mentioned above, the only thing you will need for tabs to
work is the following rule:

.ui-tabs-hide {
 display: none !important;
}

So the only thing that's imposed here seems to be our free time spent
to help creating a rock-solid ui library. I won't go into detail why
we chose to use a class for hiding tab content.


--Klaus


[jQuery] [validate] Tips on multi field validation - Composite unique constraint

2009-04-03 Thread Ted

I have this working, but not the most user friendly.  The case is
there is a combination of fields that must meet a criteria, uniqueness
in this case.  The problem I am finding is that the rules are all
attached to fields, where this case really applies to the form in
general.

In this example, an end user is adding a Member record.  A member is a
combination of a User and a Group.  Users can join many groups, groups
have many users.  A user cannot join the same group twice, so the
alternate, natural key to the Member database table is usr_id,
group_id.

The form has fields with id of user and group.

While it does work, when an error is detected, the field you just
changed is marked with the error.  The other field in the pair is not
marked as being invalid.  If I go and change the other field to make a
valid combination, the other field still shows as being in the error
state.

Looking for ideas to implement an N field validation nicely.  (I used
a ClassRule for single field unique checks, but that doesn't help
here.)

Thanks,

Ted


 var constraint = ['user', 'group'];

$.each(constraint, function(index, value) {
$("#" + value).rules("add", {
remote: {
url:  "/myapp/unique/composite",
type: "get",
data: {
classname: function() {
return $("#classname").val();
},
constraints: function() {
var result = "";
$.each(constraint, function(i, v) {
if (i > 0) {
result = result + ";";
}
result = result + v + ':' + $("#" +
v).val();
});
return result;
},
id: function() {
return $("#id").val();
}
}
},
messages: {
remote: "The combination of " + constraint + "
must be unique."
}
});
-





[jQuery] Re: All div content showing up in jQuery Tabs

2009-04-03 Thread Klaus Hartl

On 3 Apr., 20:01, expresso  wrote:
> In fact you know what the problem is?  The damn documentation doesn't tell
> you that you MUST use the stylesheets given.  All I assumed was is that I
> had to have the matching IDs and correct jQuery which I DID.
>
> What if we do not want to use those styles.  I assumed the jQuery behind
> this injected the active styles it needs out of the box.  It was not
> inferred that I must use that specific style sheet.  In fact, now that I
> know this, that should be updated in the documentation because most of us
> will not use those styles.  I'm using images in mine.  But to know that if
> you remove those styles in the demo would break this?  No way would I infer
> that.

In the Tabs documentation section Overview [1] under *Dependencies*
you'll find the following:

Required CSS:

.ui-tabs .ui-tabs-hide {
 display: none;
}

[1] http://docs.jquery.com/UI/Tabs#overview


--Klaus


[jQuery] Plugin search

2009-04-03 Thread ripple...@yahoo.com

I have been searching for a jquery plugin that has a similar feature
to ext.js and the Border Layout that can scale and or collapse a div
on click or drag, while scaling the right larger div, see it here
(Left Nav)  
http://extjs.com/deploy/dev/examples/layout-browser/layout-browser.html





[jQuery] Re: jQuery and Ruby on Rails

2009-04-03 Thread bigPHIL18

Not too much help from what i can gather.

I want it to set this jQuery variable to a Rails variable.

On Apr 3, 4:12 am, Alex  wrote:
> www.railscasts.com
>
> search : jquery
>
> On 2009-4-3, at 下午4:08, bigPHIL18 wrote:
>
>
>
>
>
> > Anyone?
>
> > On Apr 2, 8:24 pm, bigPHIL18  wrote:
> >> Hello all,
>
> >> I have been reading a lot and can not find what I am looking for. I
> >> have a Rails project, and have written a script to get the class of a
> >> ul. I want to pass this variable gathered from the script and pass it
> >> on to Rails. How would i got about doing this?
>
> >> For your information: I wrote this jQuery script just so I could  
> >> set a
> >> variable name to the name when the mouse is clicked on the UL. From
> >> then the I can delete the file from the server.
>
> >> Thank you,
> >> Phil


[jQuery] Re: FadeIn/Out mulitple images in one container

2009-04-03 Thread Zachariah

I've solved this issue before using absolutely positioned divs.
by having (in this case) three absolutely positioned divs within
#lakeview-placeholder, each with the correct img src inside,
you could hide two and leave one visible (using classes maybe). Then
animate the fades to either crossfade or callback (fadeout then
fadein).

Another option would be to use the cycle plugin with novel use of the
pager function. Example here: http://www.malsup.com/jquery/cycle/int2.html

On Apr 2, 3:10 pm, stinkysGTI  wrote:
> There's a pretty simple image replacement I'm trying to do, but can't
> get the current image to fadeOut, and the new one to fadeIn. There's
> only 3 images to choose from and always will be. With those 2 lines
> commented out, it works, just obviously without any kind of fade. I'm
> fairly new to jQuery, so any help would be greatly appreciated.
>
> $(document).ready(function() {
>         $("#lakeview-gallery a").click(function(event) {
> //              $("#lakeview-placeholder").fadeOut(800);
> //              $("#lakeview-placeholder").fadeIn(800);
>                 event.preventDefault();
>                 var image = $(this).attr("href");
>                 $("img#lakeview-placeholder").attr("src", image);
>                 });
>
> });
>
> The page can be seen here:http://www.lakeshoremontana.com/dev/floorplans.html


[jQuery] Re: Too much recusion/Out of Memory

2009-04-03 Thread Ricardo

Are you doing anything out of ordinary on your app, like handling
different documents with one jQ instance or something? With that many
errors in different places I doubt it's an issue with jquery itself.

On Apr 2, 6:53 pm, Matt Critchlow  wrote:
> Using the dev version of jquery i got the following for the recursion
> issues:
>
> too much recursion
> [Break on this error] if ( selector.nodeType ) {
> jquery-1.3.2.js (line 41)
> too much recursion
> [Break on this error] return new jQuery.fn.init( selector, context );
> jquery-1.3.2.js (line 26)
> too much recursion
> [Break on this error] hidden = this.nodeType == 1 && jQuery(this).is
> (":hidden"),
> jquery-1.3.2.js (line 3871)
> too much recursion
> [Break on this error] queue[0].call(this);
> jquery-1.3.2.js (line 1405)
> too much recursion
> [Break on this error] var msg = "Error in hook: "+ exc +" fn=\n"+fn
> +"\n stack=\n";
> firebug-...ervice.js (line 1952)
>
> however in IE i get the following error:
> Out of memory  jquery-1.3.2.js, line 1427 character 2
>
> Which is:
>
> context = context || document;
>
> On Apr 2, 11:16 am, Matt Critchlow  wrote:
>
> > I am making a lot of use of jQuery's load method to replace my main
> > content, then firing a callback function to either just bind some
> > events or do an ajax call to load some data into the page(search
> > results for example). I do this in the pageload function for the
> > history plugin to manage everything. This all seems very normal and
> > trivial to me though(for jQuery to handle), so I'm not sure it has
> > anything to do with the issue..
>
> > Thanks for sharing your experience too.
>
> > On Apr 2, 11:10 am, Donny Kurnia  wrote:
>
> > > Matt wrote:
> > > > Hi All,
>
> > > > I realize this is kind of vague, but I can't link to the site yet
> > > > since we're still in development. I'm using the latest jquery, and the
> > > > history plugin to dynamically load html into a "main" div section
> > > > depending on user action. In Firebug, I sometimes notice 3 "too much
> > > > recursion" messages, one in jquery, one in sizzle, and then one in
> > > > firebug itself. Then in IE i actually get a message popup that says
> > > > "Out of memory". It's frustrating because it doesn't happen every
> > > > time, and the site continues to function fine. This feels like a
> > > > memory leak to me, but I'm not sure how to dig into it. Does anyone
> > > > know anything regarding how the history plugin with the latest version
> > > > of jquery might introduce this?
>
> > > > Thanks all,
>
> > > > Matt
>
> > > I got the same message in firebug. I'm only use Malsup's form plugins to
> > > submit one form via ajax, and some code to load ajax data as json. I'm
> > > still use jquery 1.2.6.
>
> > > I never had this message before in old version of firebug. I wonder
> > > whether this is firebug's bug, or something else.
>
> > > --
> > > Donny 
> > > Kurniahttp://hantulab.blogspot.comhttp://www.plurk.com/user/donnykurnia


[jQuery] Re: multiple dynamic jcarousel instances

2009-04-03 Thread amuhlou

Thanks for the reply.  However, the examples link only shows static
versions, where all the carousel items are in the page to begin
with.

I understand how to initialize multiple carousels on a page, but not
multiple dynamic ones.  Each one needs to pull from a different array.
I'm just trying to get an idea of what I need to modify so that each
carousel pulls from a different array of items.

Thanks.


On Apr 2, 6:36 pm, Jason  wrote:
> Here is an example on how to have multiple jCarousels on one page.
> Summary: you need to name each jCarousel with a different ID.
>
> http://sorgalla.com/projects/jcarousel/examples/static_multiple.html
>
> On Apr 2, 12:22 pm, amuhlou  wrote:
>
> > Hello,
>
> > I'm working with thejCarouselplugin and would like to have multiple
> > carousels on one page, each dynamically pulling the scrolling items
> > from an array.  I am wondering what sort of modifications I would need
> > to make to the jcarousel_functions.php file and page xhtml to
> > accommodate 2+ instances?
>
> > Here's my sample:http://static.spartaninternet.com/sandbox/carousel/
>
> > And here is the code from the jcarousel_functions.php file:
>
> > 
> > $jcarousel_items = array(
> >     array(
> >         'title' => 'Face 1',
> >         'src' => 'images/thumbs/beach.jpg',
>
> >     ),
>
> >     array(
> >         'title' => 'Face on a dock',
> >         'src' => 'images/thumbs/beach2.jpg',
>
> >     ),
> >     array(
> >         'title' => 'blue monkey face',
> >         'src' => 'images/thumbs/beachsunset.jpg',
>
> >     ),
> >     array(
> >         'title' => 'scooter face',
> >         'src' => 'images/thumbs/frogs.jpg',
>
> >     ),
> >     array(
> >         'title' => 'fun face',
> >         'src' => 'images/thumbs/market.jpg',
>
> >     ),
> >     array(
> >         'title' => 'Flower 6',
> >         'src' => 'images/thumbs/monkey.jpg',
>
> >     ),
> >     array(
> >         'title' => 'Flower 7',
> >         'src' => 'images/thumbs/monkey2.jpg',
>
> >     ),
> >     array(
> >         'title' => 'Flower 8',
> >         'src' => 'images/thumbs/rooftops.jpg',
>
> >     ),
> >     array(
> >         'title' => 'Flower 9',
> >         'src' => 'images/thumbs/volcano.jpg',
>
> >     ),
> >     array(
> >         'title' => 'Flower 10',
> >         'src' => 'images/thumbs/waterfall.jpg',
>
> >     ),
> > );
>
> > /**
> >  * This function returns the number items. Typically, this
> >  * would fetch it from a database (SELECT COUNT(*) FROM items) or
> >  * from a directory.
> >  */
> > function jcarousel_countItems()
> > {
> >         global $jcarousel_items;
>
> >         return count($jcarousel_items);
>
> > }
>
> > /**
> >  * This function returns the items. Typically, this
> >  * would fetch it from a database (SELECT * FROM items LIMIT $limit
> > OFFSET $offset) or
> >  * from a directory.
> >  */
> > function jcarousel_getItems($limit = null, $offset = null)
> > {
> >         global $jcarousel_items;
>
> >         // Copy items over
> >         $return = $jcarousel_items;
>
> >         if ($offset !== null) {
> >                 $return = array_slice($return, $offset);
> >         }
>
> >         if ($limit !== null) {
> >                 $return = array_slice($return, 0, $limit);
> >         }
>
> >         return $return;
>
> > }
>
> > ?>
>
> > Thanks!


[jQuery] Re: Append asterisk to required field labels

2009-04-03 Thread Baum

James,

Maybe it is a question of timing?

When I hard-coded class="required" on the input fields I received the
desired effect. However, I want to get this effect based on business
rules on my object model.

Version 1.3.2 that comes as part of the asp.net mvc releases does not
contain any changes to the code. Something I forgot to mention (did
more research) and the xVal code adds the class="required" attribute
via the addClass method to the input field at runtime based on jQuery
validation (addon?) rules. I have verified using Firebug that the
class is being applied to the elements correctly.

Baum


On Apr 3, 1:16 pm, Baum  wrote:
> No. This is my first project with jQuery. I used your (James, March
> 31) code directly and that is the only jQuery call used in the entire
> site. I happened to have some asp.net MVC samples that used 1.2.6 and
> I switched the reference to use the 1.2.6 version and the code worked
> as expected.
>
> I will try to download 1.3.2 from the jQuery.com.
>
> Thanks,
>
> Baum
>
> On Apr 1, 5:54 pm, James  wrote:
>
> > I'm not sure what the asp.net MVC release of jquery is and if it's
> > been modified from the original, but on my 1.3.2 (from jquery.com),
> > the code works. So there is no problem with jQuery 1.3.2 regarding each
> > ().
> > There must be something else that's causing the issue. Do you still
> > have somewhere in your code the deprecated syntax with the @ in the
> > selectors?
> > Eg. $("inp...@type=text]")
>
> > On Mar 31, 5:51 pm,Baum wrote:
>
> > > Thanks James.
>
> > > I am just getting started with jQuery so the syntax is rather new.
> > > What I found is that the jquery-1.3.2.js file that I am using as part
> > > of the asp.net MVC release does not appear to work with each syntax (I
> > > only get the first input field back). I reverted back to 1.2.6 and it
> > > appears to work.
>
> > > This leads me to believe there is a problem with 1.3.2...
>
> > >Baum
>
> > > On Mar 31, 9:04 pm, James  wrote:
>
> > > > How about something like:
>
> > > > $required = $(".required"); // list of elements with 'required' class.
> > > > $.each($required, function(i) {
> > > >      var id = $(this).attr('id');
> > > >      var $label = $("label[for="+id+"]");
> > > >      $label.text( $label.text()+'*' );
>
> > > > });
>
> > > > The requirement is that all your .required input's ID should have a
> > > > corresponding label with a matching 'for' ID. (It's not going to bomb
> > > > or anything if it doesn't.)
>
> > > > On Mar 31, 3:46 pm,Baum wrote:
>
> > > > > One note the javascript included in the original post is incorrect...I
> > > > > was playing around and pasted the wrong copy...remove the each(). Also
> > > > > var size = $(".required").size(); is equal to 1 but var size = $
> > > > > ("input").size(); is equal to 2.
>
> > > > > Thanks.
>
> > > > > On Mar 31, 7:56 pm,Baum wrote:
>
> > > > > > Hi,
>
> > > > > > I am looking to use jQuery in conjunction with xVal for validation.
> > > > > > One of the cool things I though jQuery would allow me to do is 
> > > > > > append
> > > > > > an asterisk (*) to the label of "ALL" my fields that have a css 
> > > > > > class
> > > > > > of "required". The example below only applies the asterisk to the
> > > > > > first field.
>
> > > > > > How can I get all of the fields from my page that have a
> > > > > > class="required", find the label (previous element) for each, and
> > > > > > append some text (an asterisk) to the label for that field?
>
> > > > > > Example
> > > > > > ==
>
> > > > > > 
> > > > > > $(document).ready(function() {
> > > > > >            //$('label.required').append(' * > > > > > strong> ');
> > > > > >            $(".required").each().prev().not('input').not('br').not
> > > > > > ('select').append(' * ');
> > > > > >        });
> > > > > > 
>
> > > > > > 
>
> > > > > > LastName
> > > > > > 
>
> > > > > > Thanks,
>
> > > > > >Baum


[jQuery] Re: Get a hold of collection inside $.each?


Not possible at the moment, but would be a nice addition to each().

On Apr 3, 11:54 am, Aaron  wrote:
> I am wondering if it is possible to get a hold of a jQuery collection
> inside the each function without two expressions, like this:
>
> jQuery('p').each( function(i) {
>     if (i === 0) {
>         // alert the length of the expression jQuery('p')
>     }
>
> });
>
> I could of course do this:
>
> var els = jQuery('p');
>
> els.each( function(i) {
>     if ( i===0) {
>         alert(els.length);
>     }
>
> });
>
> But for other reasons, I'd rather do it with one expression.


[jQuery] Re: Problem with jQuery form pluging redirecting


> I use the form plugin
> $(document).ready(function() {
>     var options = {
>         target:        '#divShow',
>         beforeSubmit:  showRequest,
>         success:       showResponse
>     };
>     $('#myForm').ajaxForm(options);
>
> });
>
> This works, but in the form php file, I'm trying a redirection but the
> page redirected displays in #divShow. How can I do to redirect to the
> page not to be displayed in the div?
>
>  header("Location:http://localhost/";);
> ?>
> Thanks


The browser will not follow a redirect on an XHR request.  Why not
just skip ajax if you're going to redirect?



[jQuery] Re: Cycle plugin: pulling in only child elements with a certain class?


> I thought it might be possible using the slideExpr option, but I think
> I'm misunderstanding how that works. When I try this:
>
>         $('#slideshowl').cycle({
>             fx:    'fade',
>             pause:  1,
>             speed:    600,
>             timeout:  3,
>             slideExpr: 'div.web'
>         });
>
> I get an empty set.


No, you're not misunderstanding.  That's exactly what that option is
for.  Can you post a link to the page?


[jQuery] Re: Unexpected behavior of Cycle plugin in some browsers


> Hi, i am making a cycle plugin implementation in my site and so far
> everything went smooth without problems. but while testing my site i
> noticed that after making full reload of the site (CTRL+F5) some of
> images are shown very small, after "normal" page reload (F5) images
> are shown as they should. I noticed this behavior on both: Fx3 an
> IE7.

The easiest way to solve problems like this is to add width and height
attributes to your images.


[jQuery] Re: Getting all children, not just immediate children??

Yes, parents() returns all parents that match the given selector. closest()
will match the nearest parent that matches the selector.
-Hector


On Fri, Apr 3, 2009 at 1:45 AM, Brian Gallagher wrote:

> Sorry wasn't at the computer yesterday, that worked a treat, thanks.
> So parents() goes further that the direct parent?
>
> -Brian
>
>
>
> On Thu, Apr 2, 2009 at 10:18 PM, Ricardo  wrote:
>
>> $(this).parents('div.togglecontainer:first').find
>> ('div.toggletarget').slideToggle();
>>
>
>


[jQuery] Equalize baseline script needs converting to jQuery


Hi All

Posted this under a different title but I think 'equalizing baseline'
is a better description than 'equalizing columns'.

Basically, I need this script converted to jQuery -
http://v3.thewatchmakerproject.com/journal/354/equalising-box-baselines-with-javascript

I'm more than happy to pay for this if someone can do it for me (25USD
via PayPal).

Here's an example of it working - http://jsbin.com/ofehi

Sam


[jQuery] Re: ajaxForm + IE + file upload + you


> When ajaxForm submits a form that has a file, it opens an iframe,
> copies your filled-in form to the iframe, submits the form *in the
> iframe*, then copies the response back to you.  Very nice.

That's not quite how it works.  Nothing is copied to the iframe.  The
original form is submitted via a normal browser submit by invoking the
submit function on the form element (ie:  formElement.submit() ).  The
response is directed to a dynamically created iframe by adding a
"target" attribute to the form before it is submitted.  There is some
pre and post processing around all of this, but essentially that's how
it works.

Mike


[jQuery] Re: All div content showing up in jQuery Tabs



Thank you.  There are a LOT of docs to read.  One only goes by assuming what
makes sense until he is able to read it all.

I am doing what I can to "read up" and certainly would not take an entire
day working on this if I was not reading what I thought I needed to read. 
Maybe this link should be included in each of the widget doc pages as well
so it's not overlooked for us newbies.

Thanks.


Jonathan-179 wrote:
> 
> 
> I would suggest http://jqueryui.com/docs/Getting_Started
> 
> It talks about how to get all the dependencies for the widgets and
> about the Theme CSS.
> 
> Stop assuming and read docs, it'll be much less frustrating for
> everyone.
> 
> 
> On Apr 3, 11:01 am, expresso  wrote:
>> In fact you know what the problem is?  The damn documentation doesn't
>> tell
>> you that you MUST use the stylesheets given.  All I assumed was is that I
>> had to have the matching IDs and correct jQuery which I DID.
>>
>> What if we do not want to use those styles.  I assumed the jQuery behind
>> this injected the active styles it needs out of the box.  It was not
>> inferred that I must use that specific style sheet.  In fact, now that I
>> know this, that should be updated in the documentation because most of us
>> will not use those styles.  I'm using images in mine.  But to know that
>> if
>> you remove those styles in the demo would break this?  No way would I
>> infer
>> that.
>>
>> I was focusing on the mark-up, not the CSS which is also what the docs
>> are
>> doing.
>>
>> expresso wrote:
>>
>> > Dude, where is my mark-up wrong?  My   do have matching IDs.  Where are
>> > you NOT seeing this.
>>
>> > Jonathan-179 wrote:
>>
>> >> Wow. People are giving up their free time to try and help you and this
>> >> is the response?
>>
>> >> I went tohttp://www.jqueryui.com/demos/tabs/#defaultcopied the code
>> >> exactly and it works perfectly. The problem IS YOUR MARKUP like others
>> >> have stated to obviously deaf ears. You are monkeying with the markup
>> >> and are breaking it and have the nerve to rant about it?
>>
>> >> Fix your LIs to have  with the proper ID as stated in the
>> >> examples
>> >>                  #tabs-1 Nunc tincidunt 
>> >>                 #tabs-2 Proin dolor 
>> >>                 #tabs-3 Aenean lacinia 
>>
>> >> And It works fine. You want to use different IDs? Write your own tabs
>> >> widget.
>>
>> >> On Apr 3, 10:34 am, expresso  wrote:
>> >>> Maybe I should just give up on jQuery Tabs altogether if this is the
>> >>> kind of
>> >>> attitude and response I'll get from simply trying everything stated
>> and
>> >>> the
>> >>> syntax IS correct per my last post and has been.  I just posted some
>> >>> things
>> >>> wrong.  
>>
>> >>> Anyway, take a look at the screen video I posted so you can actually
>> see
>> >>> what it's doing.
>>
>> >>> expresso wrote:
>>
>> >>> > It doesn't make a damn bit of difference.  I've tried all the
>> things
>> >>> > everyone's said here all along.  Take this example for instance:
>>
>> >>> >   
>> >>> >       $(document).ready(function() {
>> >>> >           $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
>> >>> >       });
>> >>> >   
>>
>> >>> >     
>> >>> >         
>> >>> >              #FContent
>> >>> > /Content/Images/Product/tabset1_persform_on.gif  
>> >>> >              #PContent
>> >>> > /Content/Images/Product/tabset1_otherpers.gif  
>> >>> >              #RContent
>> >>> > /Content/Images/Product/tabset1.gif  
>> >>> >         
>> >>> >             
>> >>> >             form
>> >>> >             
>> >>> >             
>> >>> >             examples
>> >>> >            
>> >>> >            
>> >>> >             test
>> >>> >             
>> >>> >     
>>
>> >>> > For some reason this forum renders html as html so the hyperlinks
>> >>> above
>> >>> > and the image shows instead of my code.  Are there some code markup
>> >>> tags I
>> >>> > can wrap my code in when posting to this forum?
>>
>> >>> > So it doesn't matter if I try uppercase #Tabs or lower-case #tabs.
>>   I
>> >>> > prefer uppercase for my id and that should be just fine as long as
>> it
>> >>> > matches up.  Besides I tried lower case also and it made no fing
>> >>> > difference.
>>
>> >>> > Second, I stated before.  It seems to function as far as when you
>> >>> click on
>> >>> > a tab, I can see the content change via the fade effect.  It's just
>> >>> that
>> >>> > still, all 3 div content is showing up regardless of which tab I
>> >>> select.
>> >>> > If I click on tab 2 for instance, I see that it flashes from Tab 1
>> to
>> >>> Tab
>> >>> > 2 but still all 3 of those div contents are showing up, none are
>> being
>> >>> > hidden and shown per what tab you are selecting.  
>>
>> >>> > THE PROBLEM: So I'm trying to figure out why all the content is
>> >>> displaying
>> >>> > and not just the tab you're on.  Doesn't matter whether I try
>> >>> > $('#Tabs').tabs(); or adding the fade..I see the same thing.
>>
>> >>> > In fact here is a video clip of it in action if this hel

[jQuery] Re: Append asterisk to required field labels


No. This is my first project with jQuery. I used your (James, March
31) code directly and that is the only jQuery call used in the entire
site. I happened to have some asp.net MVC samples that used 1.2.6 and
I switched the reference to use the 1.2.6 version and the code worked
as expected.

I will try to download 1.3.2 from the jQuery.com.

Thanks,

Baum

On Apr 1, 5:54 pm, James  wrote:
> I'm not sure what the asp.net MVC release of jquery is and if it's
> been modified from the original, but on my 1.3.2 (from jquery.com),
> the code works. So there is no problem with jQuery 1.3.2 regarding each
> ().
> There must be something else that's causing the issue. Do you still
> have somewhere in your code the deprecated syntax with the @ in the
> selectors?
> Eg. $("inp...@type=text]")
>
> On Mar 31, 5:51 pm,Baum wrote:
>
> > Thanks James.
>
> > I am just getting started with jQuery so the syntax is rather new.
> > What I found is that the jquery-1.3.2.js file that I am using as part
> > of the asp.net MVC release does not appear to work with each syntax (I
> > only get the first input field back). I reverted back to 1.2.6 and it
> > appears to work.
>
> > This leads me to believe there is a problem with 1.3.2...
>
> >Baum
>
> > On Mar 31, 9:04 pm, James  wrote:
>
> > > How about something like:
>
> > > $required = $(".required"); // list of elements with 'required' class.
> > > $.each($required, function(i) {
> > >      var id = $(this).attr('id');
> > >      var $label = $("label[for="+id+"]");
> > >      $label.text( $label.text()+'*' );
>
> > > });
>
> > > The requirement is that all your .required input's ID should have a
> > > corresponding label with a matching 'for' ID. (It's not going to bomb
> > > or anything if it doesn't.)
>
> > > On Mar 31, 3:46 pm,Baum wrote:
>
> > > > One note the javascript included in the original post is incorrect...I
> > > > was playing around and pasted the wrong copy...remove the each(). Also
> > > > var size = $(".required").size(); is equal to 1 but var size = $
> > > > ("input").size(); is equal to 2.
>
> > > > Thanks.
>
> > > > On Mar 31, 7:56 pm,Baum wrote:
>
> > > > > Hi,
>
> > > > > I am looking to use jQuery in conjunction with xVal for validation.
> > > > > One of the cool things I though jQuery would allow me to do is append
> > > > > an asterisk (*) to the label of "ALL" my fields that have a css class
> > > > > of "required". The example below only applies the asterisk to the
> > > > > first field.
>
> > > > > How can I get all of the fields from my page that have a
> > > > > class="required", find the label (previous element) for each, and
> > > > > append some text (an asterisk) to the label for that field?
>
> > > > > Example
> > > > > ==
>
> > > > > 
> > > > > $(document).ready(function() {
> > > > >            //$('label.required').append(' * > > > > strong> ');
> > > > >            $(".required").each().prev().not('input').not('br').not
> > > > > ('select').append(' * ');
> > > > >        });
> > > > > 
>
> > > > > 
>
> > > > > LastName
> > > > > 
>
> > > > > Thanks,
>
> > > > >Baum


[jQuery] Re: Chrome bug


Sorry, I did not mentioned that I have not tested it, but was
something to try and see if it would work.
I'll try it out myself later and see it also.

On Apr 2, 9:14 pm, Javier Martinez  wrote:
> Have you tried your code?
>
> Has the exact same error.
>
> The code that I provide is not valid, but when jQuery insert it on the dom,
> is inserted correctly.
>
> Maybe I should post a ticket on the jQuery trac.
>
> Someone has some information about this?
>
> 2009/4/2 James 
>
>
>
> >  is not valid, I think.
> > You should try:
> > ''
> > instead.
>
> > On Apr 1, 11:59 pm, Javier Martinez  wrote:
> > > Chrome has errors selecting more than one element where these elements
> > are
> > > not inserted yet.
>
> > > Test case (execute this snippet in some page):
>
> > > alert($('').find('#from,
> > > #to').length);
>
> > > The version I'm using is 1.3.2
>
>


[jQuery] Re: All div content showing up in jQuery Tabs


I would suggest http://jqueryui.com/docs/Getting_Started

It talks about how to get all the dependencies for the widgets and
about the Theme CSS.

Stop assuming and read docs, it'll be much less frustrating for
everyone.


On Apr 3, 11:01 am, expresso  wrote:
> In fact you know what the problem is?  The damn documentation doesn't tell
> you that you MUST use the stylesheets given.  All I assumed was is that I
> had to have the matching IDs and correct jQuery which I DID.
>
> What if we do not want to use those styles.  I assumed the jQuery behind
> this injected the active styles it needs out of the box.  It was not
> inferred that I must use that specific style sheet.  In fact, now that I
> know this, that should be updated in the documentation because most of us
> will not use those styles.  I'm using images in mine.  But to know that if
> you remove those styles in the demo would break this?  No way would I infer
> that.
>
> I was focusing on the mark-up, not the CSS which is also what the docs are
> doing.
>
> expresso wrote:
>
> > Dude, where is my mark-up wrong?  My   do have matching IDs.  Where are
> > you NOT seeing this.
>
> > Jonathan-179 wrote:
>
> >> Wow. People are giving up their free time to try and help you and this
> >> is the response?
>
> >> I went tohttp://www.jqueryui.com/demos/tabs/#defaultcopied the code
> >> exactly and it works perfectly. The problem IS YOUR MARKUP like others
> >> have stated to obviously deaf ears. You are monkeying with the markup
> >> and are breaking it and have the nerve to rant about it?
>
> >> Fix your LIs to have  with the proper ID as stated in the
> >> examples
> >>                  #tabs-1 Nunc tincidunt 
> >>                 #tabs-2 Proin dolor 
> >>                 #tabs-3 Aenean lacinia 
>
> >> And It works fine. You want to use different IDs? Write your own tabs
> >> widget.
>
> >> On Apr 3, 10:34 am, expresso  wrote:
> >>> Maybe I should just give up on jQuery Tabs altogether if this is the
> >>> kind of
> >>> attitude and response I'll get from simply trying everything stated and
> >>> the
> >>> syntax IS correct per my last post and has been.  I just posted some
> >>> things
> >>> wrong.  
>
> >>> Anyway, take a look at the screen video I posted so you can actually see
> >>> what it's doing.
>
> >>> expresso wrote:
>
> >>> > It doesn't make a damn bit of difference.  I've tried all the things
> >>> > everyone's said here all along.  Take this example for instance:
>
> >>> >   
> >>> >       $(document).ready(function() {
> >>> >           $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
> >>> >       });
> >>> >   
>
> >>> >     
> >>> >         
> >>> >              #FContent
> >>> > /Content/Images/Product/tabset1_persform_on.gif  
> >>> >              #PContent
> >>> > /Content/Images/Product/tabset1_otherpers.gif  
> >>> >              #RContent
> >>> > /Content/Images/Product/tabset1.gif  
> >>> >         
> >>> >             
> >>> >             form
> >>> >             
> >>> >             
> >>> >             examples
> >>> >            
> >>> >            
> >>> >             test
> >>> >             
> >>> >     
>
> >>> > For some reason this forum renders html as html so the hyperlinks
> >>> above
> >>> > and the image shows instead of my code.  Are there some code markup
> >>> tags I
> >>> > can wrap my code in when posting to this forum?
>
> >>> > So it doesn't matter if I try uppercase #Tabs or lower-case #tabs.   I
> >>> > prefer uppercase for my id and that should be just fine as long as it
> >>> > matches up.  Besides I tried lower case also and it made no fing
> >>> > difference.
>
> >>> > Second, I stated before.  It seems to function as far as when you
> >>> click on
> >>> > a tab, I can see the content change via the fade effect.  It's just
> >>> that
> >>> > still, all 3 div content is showing up regardless of which tab I
> >>> select.
> >>> > If I click on tab 2 for instance, I see that it flashes from Tab 1 to
> >>> Tab
> >>> > 2 but still all 3 of those div contents are showing up, none are being
> >>> > hidden and shown per what tab you are selecting.  
>
> >>> > THE PROBLEM: So I'm trying to figure out why all the content is
> >>> displaying
> >>> > and not just the tab you're on.  Doesn't matter whether I try
> >>> > $('#Tabs').tabs(); or adding the fade..I see the same thing.
>
> >>> > In fact here is a video clip of it in action if this helps any:
> >>> >http://www.codezest.com/post/tabs.avi
>
> >>> > Here's a post about getting tabs to work but I thought this switching
> >>> and
> >>> > showing each tab content works out of the box as shown in the jQuery
> >>> > documentation?
> >>> >http://mikehodgson.com/index.cfm/2008/11/25/Really-Simple-JQuery-Tabs
>
> >>> > Klaus Hartl-4 wrote:
>
> >>> >> There's no need for all this ranting. You're simply not meeting the
> >>> >> markup requirements to make the tabs work.
>
> >>> >> A tab has to look like:
>
> >>> >>  #fragment-identifier A Tab 
>
> >>> >> I m pretty sure the

[jQuery] Re: All div content showing up in jQuery Tabs



Yes, the code works from the demo.

I found that it was not my actual mark-up which was the issue.  It was that
you had to add the specific actual stylesheet in order to get them to work.

It's just when you're looking at the examples, the explaination and code
that tells you how to "get it to work" focuses only on the mark-up.  Sure,
the CSS link is in there but one would assume that you are not tied to that
CSS for tabs to work.  So as long as I have my ids matching and the initial
jQuery in there to work on the tabs, that's all you would need.

Now that I've added that CSS (either download the css from the lates UI API:

or link to this which is shown: http://jqueryui.com/latest/themes/base/ui.all.css"; rel="stylesheet"
/>) then it starts to work.

now I have to figure out how to get rid of these imposed styles.


Jonathan-179 wrote:
> 
> 
> I'm not the tabs author this is just a guess but perhaps it needs more
> then matching IDs, perhaps it needs to follow a certain ID convention
> such as #tabs-n like was shown in the example. Like I said I'm not the
> author but I did copy the code from the site, the same code you
> claimed was broken and it worked perfect. I also took both of your
> examples and with a little tweaking of the IDs to follow the example
> it worked perfectly.
> 
> On Apr 3, 10:58 am, expresso  wrote:
>> Dude, where is my mark-up wrong?  My   do have matching IDs.  Where are
>> you
>> NOT seeing this.
>>
>> Jonathan-179 wrote:
>>
>> > Wow. People are giving up their free time to try and help you and this
>> > is the response?
>>
>> > I went tohttp://www.jqueryui.com/demos/tabs/#defaultcopied the code
>> > exactly and it works perfectly. The problem IS YOUR MARKUP like others
>> > have stated to obviously deaf ears. You are monkeying with the markup
>> > and are breaking it and have the nerve to rant about it?
>>
>> > Fix your LIs to have  with the proper ID as stated in the
>> > examples
>> >                  #tabs-1 Nunc tincidunt 
>> >             #tabs-2 Proin dolor 
>> >             #tabs-3 Aenean lacinia 
>>
>> > And It works fine. You want to use different IDs? Write your own tabs
>> > widget.
>>
>> > On Apr 3, 10:34 am, expresso  wrote:
>> >> Maybe I should just give up on jQuery Tabs altogether if this is the
>> kind
>> >> of
>> >> attitude and response I'll get from simply trying everything stated
>> and
>> >> the
>> >> syntax IS correct per my last post and has been.  I just posted some
>> >> things
>> >> wrong.  
>>
>> >> Anyway, take a look at the screen video I posted so you can actually
>> see
>> >> what it's doing.
>>
>> >> expresso wrote:
>>
>> >> > It doesn't make a damn bit of difference.  I've tried all the things
>> >> > everyone's said here all along.  Take this example for instance:
>>
>> >> >   
>> >> >       $(document).ready(function() {
>> >> >           $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
>> >> >       });
>> >> >   
>>
>> >> >     
>> >> >         
>> >> >              #FContent
>> >> > /Content/Images/Product/tabset1_persform_on.gif  
>> >> >              #PContent
>> >> > /Content/Images/Product/tabset1_otherpers.gif  
>> >> >              #RContent
>> >> > /Content/Images/Product/tabset1.gif  
>> >> >         
>> >> >             
>> >> >             form
>> >> >             
>> >> >             
>> >> >             examples
>> >> >            
>> >> >            
>> >> >             test
>> >> >             
>> >> >     
>>
>> >> > For some reason this forum renders html as html so the hyperlinks
>> above
>> >> > and the image shows instead of my code.  Are there some code markup
>> >> tags I
>> >> > can wrap my code in when posting to this forum?
>>
>> >> > So it doesn't matter if I try uppercase #Tabs or lower-case #tabs.  
>> I
>> >> > prefer uppercase for my id and that should be just fine as long as
>> it
>> >> > matches up.  Besides I tried lower case also and it made no fing
>> >> > difference.
>>
>> >> > Second, I stated before.  It seems to function as far as when you
>> click
>> >> on
>> >> > a tab, I can see the content change via the fade effect.  It's just
>> >> that
>> >> > still, all 3 div content is showing up regardless of which tab I
>> >> select.
>> >> > If I click on tab 2 for instance, I see that it flashes from Tab 1
>> to
>> >> Tab
>> >> > 2 but still all 3 of those div contents are showing up, none are
>> being
>> >> > hidden and shown per what tab you are selecting.  
>>
>> >> > THE PROBLEM: So I'm trying to figure out why all the content is
>> >> displaying
>> >> > and not just the tab you're on.  Doesn't matter whether I try
>> >> > $('#Tabs').tabs(); or adding the fade..I see the same thing.
>>
>> >> > In fact here is a video clip of it in action if this helps any:
>> >> >http://www.codezest.com/post/tabs.avi
>>
>> >> > Here's a post about getting tabs to work but I thought this
>> switching
>> >> and
>> >> > showing each tab content works out of the box as shown in the jQuery
>> >> > documentation?
>> >> >http://

[jQuery] Re: All div content showing up in jQuery Tabs


I'm not the tabs author this is just a guess but perhaps it needs more
then matching IDs, perhaps it needs to follow a certain ID convention
such as #tabs-n like was shown in the example. Like I said I'm not the
author but I did copy the code from the site, the same code you
claimed was broken and it worked perfect. I also took both of your
examples and with a little tweaking of the IDs to follow the example
it worked perfectly.

On Apr 3, 10:58 am, expresso  wrote:
> Dude, where is my mark-up wrong?  My   do have matching IDs.  Where are you
> NOT seeing this.
>
> Jonathan-179 wrote:
>
> > Wow. People are giving up their free time to try and help you and this
> > is the response?
>
> > I went tohttp://www.jqueryui.com/demos/tabs/#defaultcopied the code
> > exactly and it works perfectly. The problem IS YOUR MARKUP like others
> > have stated to obviously deaf ears. You are monkeying with the markup
> > and are breaking it and have the nerve to rant about it?
>
> > Fix your LIs to have  with the proper ID as stated in the
> > examples
> >                  #tabs-1 Nunc tincidunt 
> >             #tabs-2 Proin dolor 
> >             #tabs-3 Aenean lacinia 
>
> > And It works fine. You want to use different IDs? Write your own tabs
> > widget.
>
> > On Apr 3, 10:34 am, expresso  wrote:
> >> Maybe I should just give up on jQuery Tabs altogether if this is the kind
> >> of
> >> attitude and response I'll get from simply trying everything stated and
> >> the
> >> syntax IS correct per my last post and has been.  I just posted some
> >> things
> >> wrong.  
>
> >> Anyway, take a look at the screen video I posted so you can actually see
> >> what it's doing.
>
> >> expresso wrote:
>
> >> > It doesn't make a damn bit of difference.  I've tried all the things
> >> > everyone's said here all along.  Take this example for instance:
>
> >> >   
> >> >       $(document).ready(function() {
> >> >           $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
> >> >       });
> >> >   
>
> >> >     
> >> >         
> >> >              #FContent
> >> > /Content/Images/Product/tabset1_persform_on.gif  
> >> >              #PContent
> >> > /Content/Images/Product/tabset1_otherpers.gif  
> >> >              #RContent
> >> > /Content/Images/Product/tabset1.gif  
> >> >         
> >> >             
> >> >             form
> >> >             
> >> >             
> >> >             examples
> >> >            
> >> >            
> >> >             test
> >> >             
> >> >     
>
> >> > For some reason this forum renders html as html so the hyperlinks above
> >> > and the image shows instead of my code.  Are there some code markup
> >> tags I
> >> > can wrap my code in when posting to this forum?
>
> >> > So it doesn't matter if I try uppercase #Tabs or lower-case #tabs.   I
> >> > prefer uppercase for my id and that should be just fine as long as it
> >> > matches up.  Besides I tried lower case also and it made no fing
> >> > difference.
>
> >> > Second, I stated before.  It seems to function as far as when you click
> >> on
> >> > a tab, I can see the content change via the fade effect.  It's just
> >> that
> >> > still, all 3 div content is showing up regardless of which tab I
> >> select.
> >> > If I click on tab 2 for instance, I see that it flashes from Tab 1 to
> >> Tab
> >> > 2 but still all 3 of those div contents are showing up, none are being
> >> > hidden and shown per what tab you are selecting.  
>
> >> > THE PROBLEM: So I'm trying to figure out why all the content is
> >> displaying
> >> > and not just the tab you're on.  Doesn't matter whether I try
> >> > $('#Tabs').tabs(); or adding the fade..I see the same thing.
>
> >> > In fact here is a video clip of it in action if this helps any:
> >> >http://www.codezest.com/post/tabs.avi
>
> >> > Here's a post about getting tabs to work but I thought this switching
> >> and
> >> > showing each tab content works out of the box as shown in the jQuery
> >> > documentation?
> >> >http://mikehodgson.com/index.cfm/2008/11/25/Really-Simple-JQuery-Tabs
>
> >> > Klaus Hartl-4 wrote:
>
> >> >> There's no need for all this ranting. You're simply not meeting the
> >> >> markup requirements to make the tabs work.
>
> >> >> A tab has to look like:
>
> >> >>  #fragment-identifier A Tab 
>
> >> >> I m pretty sure the documentation is showing this fact and I don't
> >> >> understand why you took "straight code out of the example" and then
> >> >> changed it to not work. Indeed "Nowhere in
> >> >> the docs does it say you need to add code to show the first default
> >> >> tab and
> >> >> div." because you don't need to as long as you're using the proper
> >> >> markup.
>
> >> >> --Klaus
>
> >> >> On 3 Apr., 07:32, expresso  wrote:
> >> >>> I mean really if you take the straight code out of the example and
> >> try
> >> >>> to run
> >> >>> this, it doesn't even work!  So how are we to even use the docs?
> >>  Under
> >> >>> the
> >> >>> "Example" here:http://docs.jquery.com/UI/Tabs#events

[jQuery] Re: All div content showing up in jQuery Tabs



In fact you know what the problem is?  The damn documentation doesn't tell
you that you MUST use the stylesheets given.  All I assumed was is that I
had to have the matching IDs and correct jQuery which I DID.

What if we do not want to use those styles.  I assumed the jQuery behind
this injected the active styles it needs out of the box.  It was not
inferred that I must use that specific style sheet.  In fact, now that I
know this, that should be updated in the documentation because most of us
will not use those styles.  I'm using images in mine.  But to know that if
you remove those styles in the demo would break this?  No way would I infer
that.

I was focusing on the mark-up, not the CSS which is also what the docs are
doing.


expresso wrote:
> 
> Dude, where is my mark-up wrong?  My   do have matching IDs.  Where are
> you NOT seeing this.
> 
> 
> Jonathan-179 wrote:
>> 
>> 
>> Wow. People are giving up their free time to try and help you and this
>> is the response?
>> 
>> I went to http://www.jqueryui.com/demos/tabs/#default copied the code
>> exactly and it works perfectly. The problem IS YOUR MARKUP like others
>> have stated to obviously deaf ears. You are monkeying with the markup
>> and are breaking it and have the nerve to rant about it?
>> 
>> Fix your LIs to have  with the proper ID as stated in the
>> examples
>>  #tabs-1 Nunc tincidunt 
>>   #tabs-2 Proin dolor 
>>   #tabs-3 Aenean lacinia 
>> 
>> And It works fine. You want to use different IDs? Write your own tabs
>> widget.
>> 
>> On Apr 3, 10:34 am, expresso  wrote:
>>> Maybe I should just give up on jQuery Tabs altogether if this is the
>>> kind of
>>> attitude and response I'll get from simply trying everything stated and
>>> the
>>> syntax IS correct per my last post and has been.  I just posted some
>>> things
>>> wrong.  
>>>
>>> Anyway, take a look at the screen video I posted so you can actually see
>>> what it's doing.
>>>
>>>
>>>
>>> expresso wrote:
>>>
>>> > It doesn't make a damn bit of difference.  I've tried all the things
>>> > everyone's said here all along.  Take this example for instance:
>>>
>>> >   
>>> >       $(document).ready(function() {
>>> >           $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
>>> >       });
>>> >   
>>>
>>> >     
>>> >         
>>> >              #FContent
>>> > /Content/Images/Product/tabset1_persform_on.gif  
>>> >              #PContent
>>> > /Content/Images/Product/tabset1_otherpers.gif  
>>> >              #RContent
>>> > /Content/Images/Product/tabset1.gif  
>>> >         
>>> >             
>>> >             form
>>> >             
>>> >             
>>> >             examples
>>> >            
>>> >            
>>> >             test
>>> >             
>>> >     
>>>
>>> > For some reason this forum renders html as html so the hyperlinks
>>> above
>>> > and the image shows instead of my code.  Are there some code markup
>>> tags I
>>> > can wrap my code in when posting to this forum?
>>>
>>> > So it doesn't matter if I try uppercase #Tabs or lower-case #tabs.   I
>>> > prefer uppercase for my id and that should be just fine as long as it
>>> > matches up.  Besides I tried lower case also and it made no fing
>>> > difference.
>>>
>>> > Second, I stated before.  It seems to function as far as when you
>>> click on
>>> > a tab, I can see the content change via the fade effect.  It's just
>>> that
>>> > still, all 3 div content is showing up regardless of which tab I
>>> select.
>>> > If I click on tab 2 for instance, I see that it flashes from Tab 1 to
>>> Tab
>>> > 2 but still all 3 of those div contents are showing up, none are being
>>> > hidden and shown per what tab you are selecting.  
>>>
>>> > THE PROBLEM: So I'm trying to figure out why all the content is
>>> displaying
>>> > and not just the tab you're on.  Doesn't matter whether I try
>>> > $('#Tabs').tabs(); or adding the fade..I see the same thing.
>>>
>>> > In fact here is a video clip of it in action if this helps any:
>>> >http://www.codezest.com/post/tabs.avi
>>>
>>> > Here's a post about getting tabs to work but I thought this switching
>>> and
>>> > showing each tab content works out of the box as shown in the jQuery
>>> > documentation?
>>> >http://mikehodgson.com/index.cfm/2008/11/25/Really-Simple-JQuery-Tabs
>>>
>>> > Klaus Hartl-4 wrote:
>>>
>>> >> There's no need for all this ranting. You're simply not meeting the
>>> >> markup requirements to make the tabs work.
>>>
>>> >> A tab has to look like:
>>>
>>> >>  #fragment-identifier A Tab 
>>>
>>> >> I m pretty sure the documentation is showing this fact and I don't
>>> >> understand why you took "straight code out of the example" and then
>>> >> changed it to not work. Indeed "Nowhere in
>>> >> the docs does it say you need to add code to show the first default
>>> >> tab and
>>> >> div." because you don't need to as long as you're using the proper
>>> >> markup.
>>>
>>> >> --Klaus
>>>
>>> >> On 3 Apr., 07:32, expresso

[jQuery] Re: All div content showing up in jQuery Tabs



Dude, where is my mark-up wrong?  My   do have matching IDs.  Where are you
NOT seeing this.


Jonathan-179 wrote:
> 
> 
> Wow. People are giving up their free time to try and help you and this
> is the response?
> 
> I went to http://www.jqueryui.com/demos/tabs/#default copied the code
> exactly and it works perfectly. The problem IS YOUR MARKUP like others
> have stated to obviously deaf ears. You are monkeying with the markup
> and are breaking it and have the nerve to rant about it?
> 
> Fix your LIs to have  with the proper ID as stated in the
> examples
>  #tabs-1 Nunc tincidunt 
>#tabs-2 Proin dolor 
>#tabs-3 Aenean lacinia 
> 
> And It works fine. You want to use different IDs? Write your own tabs
> widget.
> 
> On Apr 3, 10:34 am, expresso  wrote:
>> Maybe I should just give up on jQuery Tabs altogether if this is the kind
>> of
>> attitude and response I'll get from simply trying everything stated and
>> the
>> syntax IS correct per my last post and has been.  I just posted some
>> things
>> wrong.  
>>
>> Anyway, take a look at the screen video I posted so you can actually see
>> what it's doing.
>>
>>
>>
>> expresso wrote:
>>
>> > It doesn't make a damn bit of difference.  I've tried all the things
>> > everyone's said here all along.  Take this example for instance:
>>
>> >   
>> >       $(document).ready(function() {
>> >           $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
>> >       });
>> >   
>>
>> >     
>> >         
>> >              #FContent
>> > /Content/Images/Product/tabset1_persform_on.gif  
>> >              #PContent
>> > /Content/Images/Product/tabset1_otherpers.gif  
>> >              #RContent
>> > /Content/Images/Product/tabset1.gif  
>> >         
>> >             
>> >             form
>> >             
>> >             
>> >             examples
>> >            
>> >            
>> >             test
>> >             
>> >     
>>
>> > For some reason this forum renders html as html so the hyperlinks above
>> > and the image shows instead of my code.  Are there some code markup
>> tags I
>> > can wrap my code in when posting to this forum?
>>
>> > So it doesn't matter if I try uppercase #Tabs or lower-case #tabs.   I
>> > prefer uppercase for my id and that should be just fine as long as it
>> > matches up.  Besides I tried lower case also and it made no fing
>> > difference.
>>
>> > Second, I stated before.  It seems to function as far as when you click
>> on
>> > a tab, I can see the content change via the fade effect.  It's just
>> that
>> > still, all 3 div content is showing up regardless of which tab I
>> select.
>> > If I click on tab 2 for instance, I see that it flashes from Tab 1 to
>> Tab
>> > 2 but still all 3 of those div contents are showing up, none are being
>> > hidden and shown per what tab you are selecting.  
>>
>> > THE PROBLEM: So I'm trying to figure out why all the content is
>> displaying
>> > and not just the tab you're on.  Doesn't matter whether I try
>> > $('#Tabs').tabs(); or adding the fade..I see the same thing.
>>
>> > In fact here is a video clip of it in action if this helps any:
>> >http://www.codezest.com/post/tabs.avi
>>
>> > Here's a post about getting tabs to work but I thought this switching
>> and
>> > showing each tab content works out of the box as shown in the jQuery
>> > documentation?
>> >http://mikehodgson.com/index.cfm/2008/11/25/Really-Simple-JQuery-Tabs
>>
>> > Klaus Hartl-4 wrote:
>>
>> >> There's no need for all this ranting. You're simply not meeting the
>> >> markup requirements to make the tabs work.
>>
>> >> A tab has to look like:
>>
>> >>  #fragment-identifier A Tab 
>>
>> >> I m pretty sure the documentation is showing this fact and I don't
>> >> understand why you took "straight code out of the example" and then
>> >> changed it to not work. Indeed "Nowhere in
>> >> the docs does it say you need to add code to show the first default
>> >> tab and
>> >> div." because you don't need to as long as you're using the proper
>> >> markup.
>>
>> >> --Klaus
>>
>> >> On 3 Apr., 07:32, expresso  wrote:
>> >>> I mean really if you take the straight code out of the example and
>> try
>> >>> to run
>> >>> this, it doesn't even work!  So how are we to even use the docs?
>>  Under
>> >>> the
>> >>> "Example" here:http://docs.jquery.com/UI/Tabs#events that code works
>> >>> there
>> >>> but when I try this in my own page, I get the same issues.
>>
>> >>> 
>> >>> 
>> >>> 
>> >>>   > >>> href="http://jqueryui.com/latest/themes/base/ui.all.css";
>> >>> rel="stylesheet" />
>> >>>   > >>> src="http://jqueryui.com/latest/jquery-1.3.2.js";>
>> >>>   > >>> src="http://jqueryui.com/latest/ui/ui.core.js";>
>> >>>   > >>> src="http://jqueryui.com/latest/ui/ui.tabs.js";>
>

[jQuery] Re: apply method to new objects


The .live event may be what you're looking for.

http://docs.jquery.com/Events/live#typefn

On Apr 3, 4:38 am, neville34  wrote:
> hey
>
> I am having trouble applying thckbox and other scripts to newly
> created objects which are created when an ajax call is made. i think
> the problem is because thckbox is applied in the document.ready
> function and the new elements are not present at the time is there any
> way to reapply thckbox and other scripts to newly created objects
>
> //thick box set in header
>
> 
> $(document).ready(function() {
>   $('a[rel*=facebox]').facebox()})
>
> 
>
> //then an ajax call is made and a table returned however the new rows
> arnt  connected to thickbox like they //should be
> function update_NewOrder(){
>         $.post("modules/ecommerce/inc.table-NewOrders.php", {}, function(data)
> {
>         $("#ecom-home-newOrder").empty();
>         $("#ecom-home-newOrder").append(data);
>
> });
>         return false;
> }


[jQuery] Re: All div content showing up in jQuery Tabs


Wow. People are giving up their free time to try and help you and this
is the response?

I went to http://www.jqueryui.com/demos/tabs/#default copied the code
exactly and it works perfectly. The problem IS YOUR MARKUP like others
have stated to obviously deaf ears. You are monkeying with the markup
and are breaking it and have the nerve to rant about it?

Fix your LIs to have  with the proper ID as stated in the
examples
Nunc tincidunt
Proin dolor
Aenean lacinia

And It works fine. You want to use different IDs? Write your own tabs
widget.

On Apr 3, 10:34 am, expresso  wrote:
> Maybe I should just give up on jQuery Tabs altogether if this is the kind of
> attitude and response I'll get from simply trying everything stated and the
> syntax IS correct per my last post and has been.  I just posted some things
> wrong.  
>
> Anyway, take a look at the screen video I posted so you can actually see
> what it's doing.
>
>
>
> expresso wrote:
>
> > It doesn't make a damn bit of difference.  I've tried all the things
> > everyone's said here all along.  Take this example for instance:
>
> >   
> >       $(document).ready(function() {
> >           $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
> >       });
> >   
>
> >     
> >         
> >              #FContent
> > /Content/Images/Product/tabset1_persform_on.gif  
> >              #PContent
> > /Content/Images/Product/tabset1_otherpers.gif  
> >              #RContent
> > /Content/Images/Product/tabset1.gif  
> >         
> >             
> >             form
> >             
> >             
> >             examples
> >            
> >            
> >             test
> >             
> >     
>
> > For some reason this forum renders html as html so the hyperlinks above
> > and the image shows instead of my code.  Are there some code markup tags I
> > can wrap my code in when posting to this forum?
>
> > So it doesn't matter if I try uppercase #Tabs or lower-case #tabs.   I
> > prefer uppercase for my id and that should be just fine as long as it
> > matches up.  Besides I tried lower case also and it made no fing
> > difference.
>
> > Second, I stated before.  It seems to function as far as when you click on
> > a tab, I can see the content change via the fade effect.  It's just that
> > still, all 3 div content is showing up regardless of which tab I select.
> > If I click on tab 2 for instance, I see that it flashes from Tab 1 to Tab
> > 2 but still all 3 of those div contents are showing up, none are being
> > hidden and shown per what tab you are selecting.  
>
> > THE PROBLEM: So I'm trying to figure out why all the content is displaying
> > and not just the tab you're on.  Doesn't matter whether I try
> > $('#Tabs').tabs(); or adding the fade..I see the same thing.
>
> > In fact here is a video clip of it in action if this helps any:
> >http://www.codezest.com/post/tabs.avi
>
> > Here's a post about getting tabs to work but I thought this switching and
> > showing each tab content works out of the box as shown in the jQuery
> > documentation?
> >http://mikehodgson.com/index.cfm/2008/11/25/Really-Simple-JQuery-Tabs
>
> > Klaus Hartl-4 wrote:
>
> >> There's no need for all this ranting. You're simply not meeting the
> >> markup requirements to make the tabs work.
>
> >> A tab has to look like:
>
> >>  #fragment-identifier A Tab 
>
> >> I m pretty sure the documentation is showing this fact and I don't
> >> understand why you took "straight code out of the example" and then
> >> changed it to not work. Indeed "Nowhere in
> >> the docs does it say you need to add code to show the first default
> >> tab and
> >> div." because you don't need to as long as you're using the proper
> >> markup.
>
> >> --Klaus
>
> >> On 3 Apr., 07:32, expresso  wrote:
> >>> I mean really if you take the straight code out of the example and try
> >>> to run
> >>> this, it doesn't even work!  So how are we to even use the docs?  Under
> >>> the
> >>> "Example" here:http://docs.jquery.com/UI/Tabs#events that code works
> >>> there
> >>> but when I try this in my own page, I get the same issues.
>
> >>> 
> >>> 
> >>> 
> >>>    >>> href="http://jqueryui.com/latest/themes/base/ui.all.css";
> >>> rel="stylesheet" />
> >>>    >>> src="http://jqueryui.com/latest/jquery-1.3.2.js";>
> >>>    >>> src="http://jqueryui.com/latest/ui/ui.core.js";>
> >>>    >>> src="http://jqueryui.com/latest/ui/ui.tabs.js";>
> >>>   
> >>>   $(document).ready(function(){
> >>>     $("#tabs").tabs();
> >>>   });
> >>>   
> >>> 
> >>> 
>
> >>> 
> >>>     
> >>>         One
> >>>         Two
> >>>         Three
> >>>     
> >>>     
> >>>         First tab is active by default:
> >>>         $('#example').tabs();
> >>>     
> >>>     
> >>>         Lor

[jQuery] Selectively load js files


Hi,

I'm looking at including jQuery UI in a project I am working on, but
one of my concerns is the large size of the full file.

I was wondering if there is something easy or built in that would
allow me to load only which jQuery UI plugins/effects I need on a
particular page.

So, something like:

loadUI({"core","accordion"});

Does that make sense? And each file would be separate on the server,
so they get cached. (like individual 

[jQuery] Hide li elements if total ul height > container height


Hi guys,

What I'm trying to do is hide list elements if their combined height
is greater than my container div.  I've got a start, but it's not
perfect.

My current script hides the last-child if their combined height >
406px, but there's still the possibility that it should hide more than
the last element.

Any advice?  Some sort of a loop?


  
$(function() {
 var heightTotal = 0;
 $('#newsEvents ul li').each(function(){
 heightTotal += +$(this).height();
if ($(heightTotal > "406"))
{
$('#newsEvents ul li:last-child').hide();
}
 });
});
  



  News and Events
  
New  STG4000 Stimulus Generators
Upcoming European Workshops
Summer School for the Educator 2009  USA
ADInstruments Enters Multi year Partnership with
The Jackson Laboratory
International Safety Standards
Human Anatomy and Physiology Society Meeting
Biomedical Engineering Society
Society for Neuroscience
American Heeart Association Scientific Sessions
  



[jQuery] Re: All div content showing up in jQuery Tabs



Maybe I should just give up on jQuery Tabs altogether if this is the kind of
attitude and response I'll get from simply trying everything stated and the
syntax IS correct per my last post and has been.  I just posted some things
wrong.  

Anyway, take a look at the screen video I posted so you can actually see
what it's doing.


expresso wrote:
> 
> It doesn't make a damn bit of difference.  I've tried all the things
> everyone's said here all along.  Take this example for instance:
> 
>   
>   $(document).ready(function() {
>   $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
>   });
>   
> 
> 
> 
>  #FContent 
> /Content/Images/Product/tabset1_persform_on.gif  
>  #PContent 
> /Content/Images/Product/tabset1_otherpers.gif  
>  #RContent 
> /Content/Images/Product/tabset1.gif  
> 
> 
> form
> 
> 
> examples
>
>
> test
> 
> 
> 
> For some reason this forum renders html as html so the hyperlinks above
> and the image shows instead of my code.  Are there some code markup tags I
> can wrap my code in when posting to this forum?
> 
> So it doesn't matter if I try uppercase #Tabs or lower-case #tabs.   I
> prefer uppercase for my id and that should be just fine as long as it
> matches up.  Besides I tried lower case also and it made no fing
> difference.
> 
> Second, I stated before.  It seems to function as far as when you click on
> a tab, I can see the content change via the fade effect.  It's just that
> still, all 3 div content is showing up regardless of which tab I select. 
> If I click on tab 2 for instance, I see that it flashes from Tab 1 to Tab
> 2 but still all 3 of those div contents are showing up, none are being
> hidden and shown per what tab you are selecting.  
> 
> THE PROBLEM: So I'm trying to figure out why all the content is displaying
> and not just the tab you're on.  Doesn't matter whether I try
> $('#Tabs').tabs(); or adding the fade..I see the same thing.
> 
> In fact here is a video clip of it in action if this helps any:
> http://www.codezest.com/post/tabs.avi
> 
> Here's a post about getting tabs to work but I thought this switching and
> showing each tab content works out of the box as shown in the jQuery
> documentation? 
> http://mikehodgson.com/index.cfm/2008/11/25/Really-Simple-JQuery-Tabs
> 
> 
> Klaus Hartl-4 wrote:
>> 
>> 
>> There's no need for all this ranting. You're simply not meeting the
>> markup requirements to make the tabs work.
>> 
>> A tab has to look like: 
>> 
>>  #fragment-identifier A Tab 
>> 
>> I m pretty sure the documentation is showing this fact and I don't
>> understand why you took "straight code out of the example" and then
>> changed it to not work. Indeed "Nowhere in
>> the docs does it say you need to add code to show the first default
>> tab and
>> div." because you don't need to as long as you're using the proper
>> markup.
>> 
>> 
>> --Klaus
>> 
>> 
>> 
>> On 3 Apr., 07:32, expresso  wrote:
>>> I mean really if you take the straight code out of the example and try
>>> to run
>>> this, it doesn't even work!  So how are we to even use the docs?  Under
>>> the
>>> "Example" here:http://docs.jquery.com/UI/Tabs#events that code works
>>> there
>>> but when I try this in my own page, I get the same issues.
>>>
>>> 
>>> 
>>> 
>>>   >> href="http://jqueryui.com/latest/themes/base/ui.all.css";
>>> rel="stylesheet" />
>>>   >> src="http://jqueryui.com/latest/jquery-1.3.2.js";>
>>>   >> src="http://jqueryui.com/latest/ui/ui.core.js";>
>>>   >> src="http://jqueryui.com/latest/ui/ui.tabs.js";>
>>>   
>>>   $(document).ready(function(){
>>>     $("#tabs").tabs();
>>>   });
>>>   
>>> 
>>> 
>>>
>>> 
>>>     
>>>         One
>>>         Two
>>>         Three
>>>     
>>>     
>>>         First tab is active by default:
>>>         $('#example').tabs();
>>>     
>>>     
>>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>>> diam
>>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>>> volutpat.
>>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>>> diam
>>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>>> volutpat.
>>>     
>>>     
>>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>>> diam
>>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>>> volutpat.
>>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>>> diam
>>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>>> volutpat.
>>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>>> diam
>>> nonummy nibh euismod tincidunt 

[jQuery] appending an option to select list (dropdown), making it the selected one


With the following code, I'm managing to append to a drop-down list
using jQuery, but can't figure out how to amend one of the existing
items in the drop down so it is not the selected one i.e. I only want
the one that's appended to be the selected one.
Can anyone help?
Here is the simplified code.

$(".actionOptAdd").bind("click",
function()
{
.
.
.
$.getJSON('lib/addToProj.php',
{}, function(data)
}, function(data)
{
   $.each(data, function(i,item)
   {
if ( i == "project" )project=item;
if ( i == "insertid" )insertid=item;
   });
   var drp = $('#dropdown');
   drp.append(""+project+"");
   });
}
);
//Thanks in advance.


[jQuery] Re: All div content showing up in jQuery Tabs



It doesn't make a damn bit of difference.  I've tried all the things
everyone's said here all along.  Take this example for instance:

  
  $(document).ready(function() {
  $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
  });
  



 #FContent 
/Content/Images/Product/tabset1_persform_on.gif  
 #PContent 
/Content/Images/Product/tabset1_otherpers.gif  
 #RContent 
/Content/Images/Product/tabset1.gif  


form


examples
   
   
test




doesn't matter if I try uppercase #Tabs or lower-case #tabs.   I prefer
uppercase for my id and that should be just fine as long as it matches up. 
Besides I tried lower case also and it made no fing difference.

Second, I stated before.  IT seems to function as far as when you click on a
tab, I can see the content change via the fade effect.  It's just that
still, all 3 div content is showing up regardless of which tab I select.  If
I click on tab 2 for instance, I see that it flashes from Tab 1 to Tab 2 but
still all 3 of those div contents are showing up, none are being hidden and
shown per what tab you are selecting.  So I'm trying to figure out why all
the content is displaying and not just the tab you're on.  Doesn't matter
whether I try $('#Tabs').tabs(); or adding the fade..I see the same thing.

In fact here is a video clip of it in action if this helps any:
http://www.codezest.com/post/tabs.avi


Klaus Hartl-4 wrote:
> 
> 
> There's no need for all this ranting. You're simply not meeting the
> markup requirements to make the tabs work.
> 
> A tab has to look like: 
> 
>  #fragment-identifier A Tab 
> 
> I m pretty sure the documentation is showing this fact and I don't
> understand why you took "straight code out of the example" and then
> changed it to not work. Indeed "Nowhere in
> the docs does it say you need to add code to show the first default
> tab and
> div." because you don't need to as long as you're using the proper
> markup.
> 
> 
> --Klaus
> 
> 
> 
> On 3 Apr., 07:32, expresso  wrote:
>> I mean really if you take the straight code out of the example and try to
>> run
>> this, it doesn't even work!  So how are we to even use the docs?  Under
>> the
>> "Example" here:http://docs.jquery.com/UI/Tabs#events that code works
>> there
>> but when I try this in my own page, I get the same issues.
>>
>> 
>> 
>> 
>>   > href="http://jqueryui.com/latest/themes/base/ui.all.css"; rel="stylesheet"
>> />
>>   > src="http://jqueryui.com/latest/jquery-1.3.2.js";>
>>   > src="http://jqueryui.com/latest/ui/ui.core.js";>
>>   > src="http://jqueryui.com/latest/ui/ui.tabs.js";>
>>   
>>   $(document).ready(function(){
>>     $("#tabs").tabs();
>>   });
>>   
>> 
>> 
>>
>> 
>>     
>>         One
>>         Two
>>         Three
>>     
>>     
>>         First tab is active by default:
>>         $('#example').tabs();
>>     
>>     
>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> diam
>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> volutpat.
>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> diam
>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> volutpat.
>>     
>>     
>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> diam
>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> volutpat.
>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> diam
>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> volutpat.
>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> diam
>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> volutpat.
>>     
>> 
>> 
>> 
>>
>> Thanks.  And this is what really "gets to me" about the docs.  Nowhere in
>> the docs does it say you need to add code to show the first default tab
>> and
>> div.  In fact the docs show you an example with example code of tabs
>> working
>> without it.
>>
>> So then why should we assume we have to write all this extra code just to
>> specify the default to load and others hidden when the docs don't even
>> show
>> that?
>>
>> I can see all the events, etc. on that page, but nowhere especially in
>> the
>> examples does it say you have to do anything other than add the following
>> script to your page along with the structure of hyperlink-to-div id
>> matchup:
>>
>>   $(document).ready(function(){
>>     $("#tabs").tabs();
>>   });
>>   
>>
>> so how does one "infer" to have to create all this extra code to get
>> basic
>> features to work when the own docs are showing you none of that!?
>>
>> If I have to h

[jQuery] DOM state on back/forward


I have a page that is manipulated via Ajax.  The user navigates away
from the page or hits the back button.  When they return with either
back or forward, it completely resets the page to it's original state.

Here is the ticket that explained to me why this is happening with
jQuery:
http://dev.jquery.com/ticket/3015

Here is a simple example of how I can revert the behavior and have the
alert only run once as I expect:

$(document).ready(function(){
  alert("test");
  $.event.remove(window, "unload");
});


This seems like it would be a bad idea, considering that jQuery put
this fix in place for a reason.  So, what am I supposed to do to
maintain changes made to the DOM?


Here is the actual scenario I'm running into:

There is a login form at the top of our homepage.  When the user hits
submit, the request is sent via Ajax.  The response is a script that
flashes a message and replaces the login form with a set of links
including a 'sign out' link.  The user goes to the next page and
decides to hit the back button.  The login form is back even though
the user is logged in.

If I turn bfcache back on by removing the unload event, it works
perfectly.  What are my options if I leave it off which seems to be
the way jQuery wants it?

One thing I can think of is resending the request to the server for
each part of the page that is dynamic and having all of the response
scripts run again, but doing that on every back/forward seems like it
should be unnecessary.

Thanks,
-Awgy


[jQuery] Cycle plugin: pulling in only child elements with a certain class?


Hello,

If my HTML for a cycle slideshow is something like the following,
where certain child divs (slides) have a particular class:







is there any way to set up the slideshow so that cycle only pulls in
the child divs with a class of "web", instead of all the divs with a
class of "slide"? So in the above example, the slideshow would contain
2 elements instead of 3.

I thought it might be possible using the slideExpr option, but I think
I'm misunderstanding how that works. When I try this:

$('#slideshowl').cycle({
fx:'fade',
pause:  1,
speed:600,
timeout:  3,
slideExpr: 'div.web'
});

I get an empty set.

Any assistance would be massively appreciated.

Cheers,

Erik


[jQuery] Apply tags (bold) to selected text on page with textareas


I have what I think should be a simple problem but I keep running into
walls.  I am a relative newbie with JQuery so pointing me in the right
direction would be greatly appreciated.

I have a page with a "calendar" view of textarea boxes.  Basically
it's 28-31 text area boxes laid out like a monthly calendar.  Users
enter text in any or all of the fields and then save the form.

I want to allow simple formatting to text within these fields.
Initially just being able to apply bold tags will be fine.   Rather
than making 31 little WYSIWYG editors I would like to have a master
form BOLD button that will apply these tags to text that is selected
regardless of which text area it is in.

In trying to figure this out I have run across a few things.
- JQuery has a select() event which will tell me when text has been
selected but I then can't figure out how to manipulate it
- I have seen straight Javascript examples of how to get selected
text, but it doesn't seem to work if I don't know which texarea it is
coming from.
- When I click a button outside the textareas the textarea in question
looses focus and the selection goes away

Does anyone know how to solve this?  It seems logical to me that
JQuery would have a mechanism to tell me what text was selected and
then apply tags to it, possibly using the wrap() method.

Any help would be appreciated.

Thanks!
-Thomas


[jQuery] Get a hold of collection inside $.each?


I am wondering if it is possible to get a hold of a jQuery collection
inside the each function without two expressions, like this:

jQuery('p').each( function(i) {
if (i === 0) {
// alert the length of the expression jQuery('p')
}
});


I could of course do this:

var els = jQuery('p');

els.each( function(i) {
if ( i===0) {
alert(els.length);
}
});

But for other reasons, I'd rather do it with one expression.


[jQuery] Re: jQuery introduction script (Alert Message is now showing!)



yrstruly,

I replaced the DOCTYPE and html begin tag with this statement in order to 
keep browsers from entering quirks-mode.

You original code worked fine in most of my browser tests except for IE8 RC.

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">


You might consider using IETester to verify which versions of IE your 
scripts work with, http://www.my-debugbar.com/wiki/IETester/HomePage.


Hope this helped.

Chuck Wagner

Subject: [jQuery] jQuery introduction script (Alert Message is now showing!)



Hallo

Im new to jQuery. I have donwloaded the jquery-1.3.2min file and i
have copied that introduction code from the website and saved it in
the same directory as the jquery file. When i run the script it seems
to be working and when i click on the link it goes to the website, but
isnt this script suppose to show an alert message first, before it
goes to the website?

Please what am i doing wrong? Have a saved it correctly or is the file
i donwloaded not valid? Please help. The code follows:




  
  


  
   $(document).ready(function(){
  $("a").click(function(event){
alert("Thanks for visiting!");
  });
});


  


  http://jquery.com/";>jQuery





[jQuery] ajaxForm + IE + file upload + you


I just solved a nasty bug on my end and thought others might benefit
from my pain.

Our form code handle lots of different types of data.  And forms can
be loaded individually via AJAX.  I recently started converting all of
this code to jquery.ajaxForm.

When ajaxForm submits a form that has a file, it opens an iframe,
copies your filled-in form to the iframe, submits the form *in the
iframe*, then copies the response back to you.  Very nice.

Unfortunately, if your code doesn't return fully valid HTML, the
iframe handler on IE doesn't format your return value well and (as
happened to us), the initial FORM tag gets put in to the HEAD.  Ugh.

Our solution was to add an extra parameter (using ajaxForm's
undocumented extraData option) indicating this would be an iframe.
Then, on the server-side, if we see this parameter, we wrap the whole
sucker to make it a valid page.

Of course, perhaps there was a better way to handle this?  Anyone else
have ideas?

_jason


[jQuery] Re: errorClass not set until after invalidHandler is called


Not a bad solutions, but there are two problems.

1. errorClass not being set when invalidHandler is called is certainly
a design flaw, unless a reason can be pointed out otherwise, and
2. neither errorList nor errorMap are documented, and per
http://docs.jquery.com/Plugins/Validation, "The validator object has
more methods, but only those documented here are intended for usage."
This means usage of errorList or errorMap will not necessarily be
supported in future versions, nor are they guaranteed to contain the
same values even if they do remain supported.

At any rate, the solution was to use the "errorPlacement" method. It
passes both the error message and the invalid element, and allows you
to determine what to do with the error on a per element basis:


errorPlacement: function(error, element) {
if (element.attr('name').indexOf('category_selector') !== -1)
$('div.error').html("You Missed A Category Selection. It has 
been
highlighted below");
else error.insertAfter(element);
}

On Apr 2, 8:44 pm, Mac  wrote:
> Hi
>
> The validator plugin contains errorList and errorMap properties. The
> erorrList contains the invalid elements and the respective messages
> and the errorMap contains the invalid element id and it's associated
> error message. Perhaps checking these will assist with determining the
> invalid element.
>
> eg. if (validator.errorMap.selectElementId == 'undefined') { execute
> code}
>
> Using undefined since you have no errormessage to test against.
>
> Hope that helps...
>
> On Apr 3, 7:04 am, CrabMan  wrote:
>
> > This makes it very difficult to determine which element is causing the
> > error and execute code in response.
>
> > For instance, the following does not work, because there is no way to
> > determine which input caused the error because the errorClass has not
> > been set yet when invalidHandler is called:
>
> > $('#step_1_form').validate({
> >         rules: {
> >                 category_selector: "required",
> >                 zip_code: "required"
> >         },
> >         messages: {
> >                 category_selector: ""
> >         },
> >         invalidHandler: function() {
> >                 if 
> > ($('select[name^="category_selector"][class*="error"]').length >
> > 0)
> >                 {
> >                         // EXECUTE SOME CODE SPECIFIC TO THIS ERROR
> >                 }
> >         }
>
> > }
>
> > A work around is to use setTimeout, but is obviously an undesirable
> > hack:
>
> > $('#step_1_form').validate({
> >         rules: {
> >                 category_selector: "required",
> >                 zip_code: "required"
> >         },
> >         messages: {
> >                 category_selector: ""
> >         },
> >         invalidHandler: function() {
> >                 var displayErrors = function() {
> >                         if 
> > ($('select[name^="category_selector"][class*="error"]').length >
> > 0)
> >                         {
> >                                 // EXECUTE SOME CODE SPECIFIC TO THIS ERROR
> >                         }
> >                 };
> >                 setTimeout(displayErrors,10);
> >         }
>
> > }
>
> > Am I correct? or is there a better way to determine the element
> > causing the error, and regardless, shouldn't errorClass be set before
> > invalidHandler is called anyways?


[jQuery] Re: $('div a.class').each ... easiest way to get "div"?


yes, I´ve checked the docs. I just remember that I´ve been reading it
somewhere lately ... but maybe I´m wrong.

thanks.


On 3 Apr., 17:01, MorningZ  wrote:
> Not sure if that's possible, the documentation makes no references to
> be able to do so
>
> http://docs.jquery.com/Selectors/descendant#ancestordescendant
>
> On Apr 3, 10:44 am, patrickk  wrote:
>
> > hmm. that´s not what I mean - I thought the ancestor (using a ancestor
> > - descendant selector) can be retrieved without using another DOM-
> > lookup.
>
> > On 3 Apr., 16:24, MorningZ  wrote:
>
> > > how about
>
> > > $("div:has(a)").each(function() {
> > >      var $div = $(this);           //Here's the div
> > >      var $a = $div.find("a");    //Here's the link
>
> > > })
>
> > > On Apr 3, 9:56 am, patrickk  wrote:
>
> > > > when using something like:
>
> > > > $('div a').each(function() {
> > > >     // what´s the easiest way to get the "DIV" here?
>
> > > > }
>
> > > > "div" doesn´t need to be a parent of "a". so, I need to know the exact
> > > > location (DOM-wise) of my links to get the "div". I can somehow
> > > > remember that there´s an extremely easy way to get the "div", but
> > > > unfortunately I can´t remember ...
>
> > > > thanks,
> > > > patrick
>
>


[jQuery] Re: Unexpected behavior of Cycle plugin in some browsers


sorry forgot to mention, temp link of the site is: 
http://dev.molips.lv/audioguide


[jQuery] Re: Problem validating checkbox before allowing submit of form


Hi there,

A few things to consider..

>From your HTML form code:

change this:

to:



>From you JS Code:

Change the following:
$("input[checkout]")

to read:

$("input[name=checkout]");  // you are matching attribute 'name' with
value 'checkout'


Regarding checking checkbox is checked or not use..change:
if ($("#accept-t-and-c").attr("checked") !== true)

To:
if( $("#accept-t-and-c").is(':checked') == false ).

Ref: http://docs.jquery.com/Traversing/is

Also.. after showing the alert box, you have return false, otherwise
the form just get submitted.

after this line...
alert("You have to agree to our terms and conditions to make a
purchase!");

Add this:
return false;


I hope it helps,

Thanks,
Abdullah.





On Apr 3, 3:16 am, osu  wrote:
> Hi,
>
> I'm trying to validate a checkbox before going to checkout in a shop
> (without using the validate plugin), but the JQuery doesn't seem to be
> working at all (i.e. nothing happens). Tried debugging in Firebug, but
> I can't seem to pinpoint the problem.
>
> Can someone have a look and see what I'm doing wrong please?
>
> Thanks,
>
> osu
>
> HTML:
>
> 
> 
> 
> Continue shopping
> 
> 
> Please confirm you have read and
> understood our Terms and Conditions (required)
> 
> 
>
> JQUERY:
>
>         
>         //                 // JQuery function to test if t-and-c checkbox checked
>                 $(document).ready(function(){
>                         $("input[checkout]").click(function(){
>                                 var pass = false;
>                                 if ($("#accept-t-and-c").attr("checked") !== 
> true){
>                                         alert("You have to agree to our terms 
> and conditions to make a
> purchase!");
>                                 } else
>                                 // let 'em through to checkout
>                                 pass = true;
>                         });
>                 });
>         //]]>
>         


[jQuery] Re: $('div a.class').each ... easiest way to get "div"?


Not sure if that's possible, the documentation makes no references to
be able to do so

http://docs.jquery.com/Selectors/descendant#ancestordescendant


On Apr 3, 10:44 am, patrickk  wrote:
> hmm. that´s not what I mean - I thought the ancestor (using a ancestor
> - descendant selector) can be retrieved without using another DOM-
> lookup.
>
> On 3 Apr., 16:24, MorningZ  wrote:
>
> > how about
>
> > $("div:has(a)").each(function() {
> >      var $div = $(this);           //Here's the div
> >      var $a = $div.find("a");    //Here's the link
>
> > })
>
> > On Apr 3, 9:56 am, patrickk  wrote:
>
> > > when using something like:
>
> > > $('div a').each(function() {
> > >     // what´s the easiest way to get the "DIV" here?
>
> > > }
>
> > > "div" doesn´t need to be a parent of "a". so, I need to know the exact
> > > location (DOM-wise) of my links to get the "div". I can somehow
> > > remember that there´s an extremely easy way to get the "div", but
> > > unfortunately I can´t remember ...
>
> > > thanks,
> > > patrick


[jQuery] Re: jQuery in Firefox extension is broken in v1.3.2


I would suggest to take a look at this great blog post

http://www.learningjquery.com/2009/03/3-quick-steps-for-a-painless-upgrade-to-jquery-13

see if any of those breaking changes applies to your code..   the
":visible" change really is a big one... the "@" in the selector is
more an annoyance but anyways, maybe one of those 3 tips will help
you fix your issue


On Apr 3, 7:59 am, "bjorn.frant...@gmail.com"
 wrote:
> I am developing a Firefox extension and after upgrading from jQuery
> v1.2.6 to v1.3.2 I found that including jQuery in the XUL-file will
> break other extensions that displays buttons on the toolbar, among
> those is Adblock Plus.
>
> I have not tried any versions between those mentioned so I do not know
> in what version this happened.  If i revert to v1.2.6 everything is
> OK.


[jQuery] Re: $('div a.class').each ... easiest way to get "div"?


hmm. that´s not what I mean - I thought the ancestor (using a ancestor
- descendant selector) can be retrieved without using another DOM-
lookup.


On 3 Apr., 16:24, MorningZ  wrote:
> how about
>
> $("div:has(a)").each(function() {
>      var $div = $(this);           //Here's the div
>      var $a = $div.find("a");    //Here's the link
>
> })
>
> On Apr 3, 9:56 am, patrickk  wrote:
>
> > when using something like:
>
> > $('div a').each(function() {
> >     // what´s the easiest way to get the "DIV" here?
>
> > }
>
> > "div" doesn´t need to be a parent of "a". so, I need to know the exact
> > location (DOM-wise) of my links to get the "div". I can somehow
> > remember that there´s an extremely easy way to get the "div", but
> > unfortunately I can´t remember ...
>
> > thanks,
> > patrick
>
>


[jQuery] Re: Internet Explorer 7 Bugs!


Why are you using

$('#toggleSection').css("display","none");

instead of

$('#toggleSection').hide();?

I'd try that and see if it works



Michael Forcer wrote:
> Hi,
>
> I am trying to run some code on my web page... it works fine in Mozilla but
> does not work at all in Internet Explorer 7.
>
> i am trying to use the fadeOut effect and the slideDown effect.
>
> I have a standard text link, that when clicked i want to fade away and slide
> down the content of the associated div.
>
> the code i am using for fadeOut is :
>
> $(document).ready(function() {
>
> $('#toggleButton').click(function () {
> $('#toggleButton').fadeOut("slow");
>
> });
> });
>
> and the code i am using for slideDown is:
>
> $(document).ready(function() {
> $('#toggleSection').css("display","none");
>
> $('#toggleButton').click(function() {
> if ($('#toggleSection').is(":hidden"))
> {
>  $('#toggleSection').slideDown("slow");
> }
> });
> });
>
> the html code is:
>
> CLICK HERE
>
> 
> 
> 
>
> As you can see, up-on clicking the text link it should fade out and slide
> down the toggleSection div. However neither effect is achieved in Internet
> Explorer 7, although works perfect in Mozilla.
>
> Kind regards,
> Michael


[jQuery] Re: How to block control + plus/minus key?

Indeed it is perverse but, unfortunately, that's what my client asked me to do. 
She wants to block zooming in and zooming out. I told her that it can't be 
done, so she asked me to find a way to block the control key combination. ;/




- Original Message - 
From: Filipe 
To: jquery-en@googlegroups.com 
Sent: Friday, April 03, 2009 1:05 AM
Subject: How to block control + plus/minus key?


hey folks,

how can i block control + plus/minus key on the whole page? i've tried a few 
scripts but none of them seem to work. 

thanks in advance!

filipe.

[jQuery] Re: $('div a.class').each ... easiest way to get "div"?


how about

$("div:has(a)").each(function() {
 var $div = $(this);   //Here's the div
 var $a = $div.find("a");//Here's the link
})

On Apr 3, 9:56 am, patrickk  wrote:
> when using something like:
>
> $('div a').each(function() {
>     // what´s the easiest way to get the "DIV" here?
>
> }
>
> "div" doesn´t need to be a parent of "a". so, I need to know the exact
> location (DOM-wise) of my links to get the "div". I can somehow
> remember that there´s an extremely easy way to get the "div", but
> unfortunately I can´t remember ...
>
> thanks,
> patrick


[jQuery] $('div a.class').each ... easiest way to get "div"?


when using something like:

$('div a').each(function() {
// what´s the easiest way to get the "DIV" here?
}

"div" doesn´t need to be a parent of "a". so, I need to know the exact
location (DOM-wise) of my links to get the "div". I can somehow
remember that there´s an extremely easy way to get the "div", but
unfortunately I can´t remember ...

thanks,
patrick


[jQuery] Re: Excluding some children in a selector


I rushed a bit in writing the html, the id should correspond to the
table and not the tr.  The is("button") didn't work but is("input") is
getting what I wanted, thanks for the help.

On Apr 2, 5:55 pm, "Richard D. Worth"  wrote:
> On Thu, Apr 2, 2009 at 4:14 PM, Thierry  wrote:
>
> > I have the following structure for tr:
>
> > 
> >   
> >   
> >   
> >      
> >   
> > 
>
> > I also have the following javascript:
>
> > $("#world tr").click(function() {
> >   // do stuffs
> > });
>
> this selector doesn't seem to match your html, as it reads "all TRs within
> the item with an id of world" but the item with an id of world is a TR, and
> wouldn't contain any unless you've got nested tables. Perhaps you meant #
> world.tr or ?
>
>
>
> > Is there a way to prevent the above event from triggering when the
> > hello button is clicked?
>
> check event.target inside the click callback
>
> $("#world").click(function(event) {
>   if (!$(event.target).is("button")) {
>     //do stuff
>   }
>
> });
>
> - Richard


[jQuery] Internet Explorer 7 Bugs!

Hi,

I am trying to run some code on my web page... it works fine in Mozilla but
does not work at all in Internet Explorer 7.

i am trying to use the fadeOut effect and the slideDown effect.

I have a standard text link, that when clicked i want to fade away and slide
down the content of the associated div.

the code i am using for fadeOut is :

$(document).ready(function() {

$('#toggleButton').click(function () {
$('#toggleButton').fadeOut("slow");

});
});

and the code i am using for slideDown is:

$(document).ready(function() {
$('#toggleSection').css("display","none");

$('#toggleButton').click(function() {
if ($('#toggleSection').is(":hidden"))
{
 $('#toggleSection').slideDown("slow");
}
});
});

the html code is:

CLICK HERE





As you can see, up-on clicking the text link it should fade out and slide
down the toggleSection div. However neither effect is achieved in Internet
Explorer 7, although works perfect in Mozilla.

Kind regards,
Michael


[jQuery] Re: All div content showing up in jQuery Tabs


I think you assume too much... heh heh

want working code?  follow the examples  :-)

http://www.jqueryui.com/demos/tabs/


On Apr 3, 8:58 am, expresso  wrote:
> I had updated my first post but does not look like it went through.  The #
> red and div ids are the same.  I will update that.
>
> Second, we shouldn't have to use the same Ids as outlined in the example as
> long as our jQuery is referencing the correct names one would assume
>
> MorningZ wrote:
>
> > Either one of your examples do not have a valid structure
>
> > your first post has
>
> > 
> >       $(document).ready(function() {
> >       $('#Tabs div:Form1Content').show();
> >       $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
> >       });
> >   
> > 
> >         
> >              #Form1Content
> > Images/Product/tab1.gif  
> >              #Form2Content
> > Images/Product/tab2.gif  
> >              #Form3Content
> > Images/Product/tab3.gif  
> >     
> >      
> >           form
> >           examples
> >           test
> >      
> > 
>
> > I don't know where you saw any (official) example of the structure
> > with the  you call "TabsMain" wrapped around the content divs,
> > but they shouldn't be there
>
> > you also don't have hyperlinks inside the  items (which even the
> > second same code doesn't have), and even if you did, the id's you
> > refer to in the 's, "#Form1Content", "#Form2Content",
> > "#Form3Content" don't match the IDs of the content divs of "PContent",
> > "OContent", and "RContent"...    so your first example doesn't have
> > valid structure and isn't properly mapped, and your supposedly
> > "straight from the docs" second example posted has One, which
> > gives no clue what tabs to show/hide
>
> > There is absolutely no reason why this code
>
> > 
> >         
> >              #PContent One  > li>
> >              #OContent Two  > li>
> >              #RContent Three > a>
> >     
> >      form
> >     examples
> >     test
> > 
>
> > won't work
>
> > On Apr 3, 8:09 am, expresso  wrote:
> >> Klaus, a couple points:
>
> >> First, let me state that it appears that I do see content being changed
> >> on
> >> click of each tab.  That is NOT my problem here.
>
> >> 1) if it's the span tags you're referring to, I tried that by wrapping
> >> the
> >> spans either around text or an image and it made no diff.  When I click
> >> on a
> >> tab, I do see the content dive changing..the problem is still that the
> >> dive
> >> are not hidden and all 3 referenced divs are exposed as you can see in my
> >> screen shot.  So the clicking seems to work...it's that the divs are not
> >> being hidden/shown correctly
> >> 2) I even tried the code as I stated right out of the example on the
> >> jquery
> >> tabs page.  Same results.  Now you're saying I changed something there?
> >>  No
> >> way man.
>
> >> So maybe you don't understand MY problem still?  Yes frustrated and
> >> sometimes we should all be allotted to be a little human at times ay?
>
> >> Klaus Hartl-4 wrote:
>
> >> > There's no need for all this ranting. You're simply not meeting the
> >> > markup requirements to make the tabs work.
>
> >> > A tab has to look like:
>
> >> >  #fragment-identifier A Tab 
>
> >> > I m pretty sure the documentation is showing this fact and I don't
> >> > understand why you took "straight code out of the example" and then
> >> > changed it to not work. Indeed "Nowhere in
> >> > the docs does it say you need to add code to show the first default
> >> > tab and
> >> > div." because you don't need to as long as you're using the proper
> >> > markup.
>
> >> > --Klaus
>
> >> > On 3 Apr., 07:32, expresso  wrote:
> >> >> I mean really if you take the straight code out of the example and try
> >> to
> >> >> run
> >> >> this, it doesn't even work!  So how are we to even use the docs?
> >>  Under
> >> >> the
> >> >> "Example" here:http://docs.jquery.com/UI/Tabs#events that code works
> >> >> there
> >> >> but when I try this in my own page, I get the same issues.
>
> >> >> 
> >> >> 
> >> >> 
> >> >>    >> >> href="http://jqueryui.com/latest/themes/base/ui.all.css";
> >> rel="stylesheet"
> >> >> />
> >> >>    >> >> src="http://jqueryui.com/latest/jquery-1.3.2.js";>
> >> >>    >> >> src="http://jqueryui.com/latest/ui/ui.core.js";>
> >> >>    >> >> src="http://jqueryui.com/latest/ui/ui.tabs.js";>
> >> >>   
> >> >>   $(document).ready(function(){
> >> >>     $("#tabs").tabs();
> >> >>   });
> >> >>   
> >> >> 
> >> >> 
>
> >> >> 
> >> >>     
> >> >>         One
> >> >>         Two
> >> >>         Three
> >> >>     
> >> >>     
> >> >>         First tab is active by default:
> >> >>         $('#example').tabs();
> >> >>     
> >> >>     
> >> >>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
> >> >> diam
> >> >> nonum

[jQuery] Re: Problem validating checkbox before allowing submit of form


Just a thought...but perhaps you need to
see if the "checked" attribute has the value of "checked"
instead of true...

if ($("#accept-t-and-c").attr("checked") !== "checked"){

perhaps that will work for you.

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of osu
Sent: Friday, April 03, 2009 7:42 AM
To: jQuery (English)
Subject: [jQuery] Re: Problem validating checkbox before allowing submit of
form


Anyone? Pretty please :)



On Apr 3, 9:16 am, osu  wrote:
> Hi,
>
> I'm trying to validate a checkbox before going to checkout in a shop
> (without using the validate plugin), but the JQuery doesn't seem to be
> working at all (i.e. nothing happens). Tried debugging in Firebug, but
> I can't seem to pinpoint the problem.
>
> Can someone have a look and see what I'm doing wrong please?
>
> Thanks,
>
> osu
>
> HTML:
>
> 
> 
> 
> Continue shopping
> 
> 
> Please confirm you have read and
> understood our Terms and Conditions (required)
> 
> 
>
> JQUERY:
>
>         
>         //                 // JQuery function to test if t-and-c checkbox checked
>                 $(document).ready(function(){
>                         $("input[checkout]").click(function(){
>                                 var pass = false;
>                                 if ($("#accept-t-and-c").attr("checked")
!== true){
>                                         alert("You have to agree to our
terms and conditions to make a
> purchase!");
>                                 } else
>                                 // let 'em through to checkout
>                                 pass = true;
>                         });
>                 });
>         //]]>
>         



[jQuery] Re: All div content showing up in jQuery Tabs



I had updated my first post but does not look like it went through.  The #
red and div ids are the same.  I will update that.

Second, we shouldn't have to use the same Ids as outlined in the example as
long as our jQuery is referencing the correct names one would assume

MorningZ wrote:
> 
> 
> Either one of your examples do not have a valid structure
> 
> your first post has
> 
> 
>   $(document).ready(function() {
>   $('#Tabs div:Form1Content').show();
>   $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
>   });
>   
> 
> 
>  #Form1Content
> Images/Product/tab1.gif  
>  #Form2Content
> Images/Product/tab2.gif  
>  #Form3Content
> Images/Product/tab3.gif  
> 
>  
>   form
>   examples
>   test
>  
> 
> 
> I don't know where you saw any (official) example of the structure
> with the  you call "TabsMain" wrapped around the content divs,
> but they shouldn't be there
> 
> you also don't have hyperlinks inside the  items (which even the
> second same code doesn't have), and even if you did, the id's you
> refer to in the 's, "#Form1Content", "#Form2Content",
> "#Form3Content" don't match the IDs of the content divs of "PContent",
> "OContent", and "RContent"...so your first example doesn't have
> valid structure and isn't properly mapped, and your supposedly
> "straight from the docs" second example posted has One, which
> gives no clue what tabs to show/hide
> 
> There is absolutely no reason why this code
> 
> 
> 
>  #PContent One  li>
>  #OContent Two  li>
>  #RContent Three a>
> 
>  form
> examples
> test
> 
> 
> won't work
> 
> On Apr 3, 8:09 am, expresso  wrote:
>> Klaus, a couple points:
>>
>> First, let me state that it appears that I do see content being changed
>> on
>> click of each tab.  That is NOT my problem here.
>>
>> 1) if it's the span tags you're referring to, I tried that by wrapping
>> the
>> spans either around text or an image and it made no diff.  When I click
>> on a
>> tab, I do see the content dive changing..the problem is still that the
>> dive
>> are not hidden and all 3 referenced divs are exposed as you can see in my
>> screen shot.  So the clicking seems to work...it's that the divs are not
>> being hidden/shown correctly
>> 2) I even tried the code as I stated right out of the example on the
>> jquery
>> tabs page.  Same results.  Now you're saying I changed something there?
>>  No
>> way man.
>>
>> So maybe you don't understand MY problem still?  Yes frustrated and
>> sometimes we should all be allotted to be a little human at times ay?
>>
>>
>>
>> Klaus Hartl-4 wrote:
>>
>> > There's no need for all this ranting. You're simply not meeting the
>> > markup requirements to make the tabs work.
>>
>> > A tab has to look like:
>>
>> >  #fragment-identifier A Tab 
>>
>> > I m pretty sure the documentation is showing this fact and I don't
>> > understand why you took "straight code out of the example" and then
>> > changed it to not work. Indeed "Nowhere in
>> > the docs does it say you need to add code to show the first default
>> > tab and
>> > div." because you don't need to as long as you're using the proper
>> > markup.
>>
>> > --Klaus
>>
>> > On 3 Apr., 07:32, expresso  wrote:
>> >> I mean really if you take the straight code out of the example and try
>> to
>> >> run
>> >> this, it doesn't even work!  So how are we to even use the docs?
>>  Under
>> >> the
>> >> "Example" here:http://docs.jquery.com/UI/Tabs#events that code works
>> >> there
>> >> but when I try this in my own page, I get the same issues.
>>
>> >> 
>> >> 
>> >> 
>> >>   > >> href="http://jqueryui.com/latest/themes/base/ui.all.css";
>> rel="stylesheet"
>> >> />
>> >>   > >> src="http://jqueryui.com/latest/jquery-1.3.2.js";>
>> >>   > >> src="http://jqueryui.com/latest/ui/ui.core.js";>
>> >>   > >> src="http://jqueryui.com/latest/ui/ui.tabs.js";>
>> >>   
>> >>   $(document).ready(function(){
>> >>     $("#tabs").tabs();
>> >>   });
>> >>   
>> >> 
>> >> 
>>
>> >> 
>> >>     
>> >>         One
>> >>         Two
>> >>         Three
>> >>     
>> >>     
>> >>         First tab is active by default:
>> >>         $('#example').tabs();
>> >>     
>> >>     
>> >>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> >> diam
>> >> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> >> volutpat.
>> >>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> >> diam
>> >> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> >> volutpat.
>> >>     
>> >>     
>> >>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> >> diam
>> >> nonummy nibh euismod tin

[jQuery] Re: jQuery introduction script (Alert Message is now showing!)



I think the OP does want it to follow the link, but show the alert first ?

So "return false" is not required.

OP - make sure jQuery is loading (there's no error if it doesn't). Try 
just an alert message within $(document).ready() itself.




Steve wrote:

Hi,

You need to return false so the anchor tag does not behave in its
normal way (ie, take you to the link specified).

So this should work:

$("a").click(function(event){
alert("Thanks for visiting!");
return false;
  });


On Apr 2, 9:47 pm, "Mohd.Tareq"  wrote:
  

On Fri, Apr 3, 2009 at 5:52 AM, yrstruly  wrote:



Hallo
  
Im new to jQuery. I have donwloaded the jquery-1.3.2min file and i

have copied that introduction code from the website and saved it in
the same directory as the jquery file. When i run the script it seems
to be working and when i click on the link it goes to the website, but
isnt this script suppose to show an alert message first, before it
goes to the website?
  
Please what am i doing wrong? Have a saved it correctly or is the file

i donwloaded not valid? Please help. The code follows:
  


 
 
  
  
  
  
   $(document).ready(function(){
  $("a").click(function(event){
alert("Thanks for visiting!");
  });
 });
http://jquery.com/";>jQuery === ===Go for this script you can see now ur click function will execute first & then it will go for link $(document).ready(function(){ $("a").click(function(event){ window.href="http://jquery.com/";; <http://jquery.com/> alert("Thanks for visiting!"); return true; }); }); http://jquery.com/>">jQuery cheers. Ragx No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.238 / Virus Database: 270.11.40/2039 - Release Date: 04/03/09 06:19:00

[jQuery] Re: FadeIn/Out mulitple images in one container



Just bear in mind that that code will "fade in" as soon as the SRC 
attribute is set - it won't wait for the image to load...could result in 
an empty box fading in, and then the image suddenly appearing when it loads.


you'll need to trigger a ".load" function for the image too; this should 
be possible to do outside / independently of the click or fadein (i.e. 
an independent function within $(document).ready by itself).


James wrote:

You need to place your content inside the callback function for
fadeOut. The callback is executed after the content is faded out.

$(document).ready(function() {
 $("#lakeview-gallery a").click(function(event) {
  $("#lakeview-placeholder").fadeOut(800, function() {
   // this content will start once the content is faded
out
   var image = $(this).attr("href");
   $("img#lakeview-placeholder").attr("src", image);
   $("#lakeview-placeholder").fadeIn(800);
   return false;
  });
 });
});

On Apr 2, 11:10 am, stinkysGTI  wrote:
  

There's a pretty simple image replacement I'm trying to do, but can't
get the current image to fadeOut, and the new one to fadeIn. There's
only 3 images to choose from and always will be. With those 2 lines
commented out, it works, just obviously without any kind of fade. I'm
fairly new to jQuery, so any help would be greatly appreciated.

$(document).ready(function() {
$("#lakeview-gallery a").click(function(event) {
//  $("#lakeview-placeholder").fadeOut(800);
//  $("#lakeview-placeholder").fadeIn(800);
event.preventDefault();
var image = $(this).attr("href");
$("img#lakeview-placeholder").attr("src", image);
});

});

The page can be seen here:http://www.lakeshoremontana.com/dev/floorplans.html



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.0.238 / Virus Database: 270.11.40/2039 - Release Date: 04/03/09 06:19:00







[jQuery] Unexpected behavior of Cycle plugin in some browsers


Hi, i am making a cycle plugin implementation in my site and so far
everything went smooth without problems. but while testing my site i
noticed that after making full reload of the site (CTRL+F5) some of
images are shown very small, after "normal" page reload (F5) images
are shown as they should. I noticed this behavior on both: Fx3 an
IE7.
Another problem is that on IE images are shown a bit smaller and there
are 3-4px white borders around them.
Can anybody help me out with this problem.


[jQuery] apply method to new objects


hey

I am having trouble applying thckbox and other scripts to newly
created objects which are created when an ajax call is made. i think
the problem is because thckbox is applied in the document.ready
function and the new elements are not present at the time is there any
way to reapply thckbox and other scripts to newly created objects

//thick box set in header


$(document).ready(function() {
  $('a[rel*=facebox]').facebox()
})


//then an ajax call is made and a table returned however the new rows
arnt  connected to thickbox like they //should be
function update_NewOrder(){
$.post("modules/ecommerce/inc.table-NewOrders.php", {}, function(data)
{
$("#ecom-home-newOrder").empty();
$("#ecom-home-newOrder").append(data);
});
return false;
}


[jQuery] jQuery in Firefox extension is broken in v1.3.2


I am developing a Firefox extension and after upgrading from jQuery
v1.2.6 to v1.3.2 I found that including jQuery in the XUL-file will
break other extensions that displays buttons on the toolbar, among
those is Adblock Plus.

I have not tried any versions between those mentioned so I do not know
in what version this happened.  If i revert to v1.2.6 everything is
OK.



[jQuery] addClass and removeClass


Hi there,

I'm getting an interesting problem with addClass and removeClass. I'm 
attempting to build a rating system using radio buttons to select the 
rating. I'm actually hiding my radio buttons and styling the label to 
have pretty stars instead for a nicer interface. I want to highlight the 
star when the radio button is selected, so when the label is clicked by 
adding the 'active' class. I also need to remove the 'active' class from 
all other labels so that only one is selected at any one time.

I assumed that removing the class from all of them and then re-adding 
for the one I am clicking would be the most efficient way for doing this 
like so.

jQuery(document).ready(function () {
 jQuery('label.star').click(function (event) {
   jQuery('label.star').removeClass('active');
   jQuery(event.target).addClass('active');
 });
});


However this now has no effect, the class is simply not added at all now.

Anyone got any ideas why this doesn't work?

Cheers

RobL
http://www.robl.me


[jQuery] [autocomplete] enhancement: new function to show all values even when the input contains a value already


Hi,
We had the requirement to show a link next to the input field like
"show options". When clicking this link the autocomplete input field
should show the drop down with all the available values. That
functionality is already there, but only if the input field is empty
and you click/focus/keydown/keyup it.

But if there is already a value inside the input field then the
dropdown only shows a subset of values which match the current value
(depending on some options).

But what we want is that even something is filled in already, that you
see the complete list...regardless of the current input field
content.

I have opened up a ticket in the bugtracker at http://dev.jquery.com/ticket/4485
which describes the problem and contains a patch for a possible
solution.
It also shows an example how to use this solution.

Maybe that is helpful for somebody else.
I have search this group here and found at least this post (http://
groups.google.com/group/jquery-en/msg/622c36085eba1f6e) where the
author had the same requirement.

Thanks
Christoph


[jQuery] Re: Problem validating checkbox before allowing submit of form

halo... 2 the point.. how to parsing xml with jquery? thanks


[jQuery] Re: How to block control + plus/minus key?

I'm really curious about why you'd want to stop users from increasing and 
decreasing their text size?  Good guidance would dictate that you use ems to 
define font size so that users could take advantage of this built-in browser 
functionality.


Subject: [jQuery] How to block control + plus/minus key?


hey folks,

how can i block control + plus/minus key on the whole page? i've tried a few 
scripts but none of them seem to work. 

thanks in advance!

filipe.

[jQuery] Re: All div content showing up in jQuery Tabs


Either one of your examples do not have a valid structure

your first post has


  $(document).ready(function() {
  $('#Tabs div:Form1Content').show();
  $('#Tabs').tabs({ fx: { opacity: 'toggle'} });
  });
  


 #Form1Content
Images/Product/tab1.gif  
 #Form2Content
Images/Product/tab2.gif  
 #Form3Content
Images/Product/tab3.gif  

 
  form
  examples
  test
 


I don't know where you saw any (official) example of the structure
with the  you call "TabsMain" wrapped around the content divs,
but they shouldn't be there

you also don't have hyperlinks inside the  items (which even the
second same code doesn't have), and even if you did, the id's you
refer to in the 's, "#Form1Content", "#Form2Content",
"#Form3Content" don't match the IDs of the content divs of "PContent",
"OContent", and "RContent"...so your first example doesn't have
valid structure and isn't properly mapped, and your supposedly
"straight from the docs" second example posted has One, which
gives no clue what tabs to show/hide

There is absolutely no reason why this code



One
Two
Three

 form
examples
test


won't work

On Apr 3, 8:09 am, expresso  wrote:
> Klaus, a couple points:
>
> First, let me state that it appears that I do see content being changed on
> click of each tab.  That is NOT my problem here.
>
> 1) if it's the span tags you're referring to, I tried that by wrapping the
> spans either around text or an image and it made no diff.  When I click on a
> tab, I do see the content dive changing..the problem is still that the dive
> are not hidden and all 3 referenced divs are exposed as you can see in my
> screen shot.  So the clicking seems to work...it's that the divs are not
> being hidden/shown correctly
> 2) I even tried the code as I stated right out of the example on the jquery
> tabs page.  Same results.  Now you're saying I changed something there?  No
> way man.
>
> So maybe you don't understand MY problem still?  Yes frustrated and
> sometimes we should all be allotted to be a little human at times ay?
>
>
>
> Klaus Hartl-4 wrote:
>
> > There's no need for all this ranting. You're simply not meeting the
> > markup requirements to make the tabs work.
>
> > A tab has to look like:
>
> >  #fragment-identifier A Tab 
>
> > I m pretty sure the documentation is showing this fact and I don't
> > understand why you took "straight code out of the example" and then
> > changed it to not work. Indeed "Nowhere in
> > the docs does it say you need to add code to show the first default
> > tab and
> > div." because you don't need to as long as you're using the proper
> > markup.
>
> > --Klaus
>
> > On 3 Apr., 07:32, expresso  wrote:
> >> I mean really if you take the straight code out of the example and try to
> >> run
> >> this, it doesn't even work!  So how are we to even use the docs?  Under
> >> the
> >> "Example" here:http://docs.jquery.com/UI/Tabs#events that code works
> >> there
> >> but when I try this in my own page, I get the same issues.
>
> >> 
> >> 
> >> 
> >>    >> href="http://jqueryui.com/latest/themes/base/ui.all.css"; rel="stylesheet"
> >> />
> >>    >> src="http://jqueryui.com/latest/jquery-1.3.2.js";>
> >>    >> src="http://jqueryui.com/latest/ui/ui.core.js";>
> >>    >> src="http://jqueryui.com/latest/ui/ui.tabs.js";>
> >>   
> >>   $(document).ready(function(){
> >>     $("#tabs").tabs();
> >>   });
> >>   
> >> 
> >> 
>
> >> 
> >>     
> >>         One
> >>         Two
> >>         Three
> >>     
> >>     
> >>         First tab is active by default:
> >>         $('#example').tabs();
> >>     
> >>     
> >>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
> >> diam
> >> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
> >> volutpat.
> >>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
> >> diam
> >> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
> >> volutpat.
> >>     
> >>     
> >>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
> >> diam
> >> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
> >> volutpat.
> >>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
> >> diam
> >> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
> >> volutpat.
> >>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
> >> diam
> >> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
> >> volutpat.
> >>     
> >> 
> >> 
> >> 
>
> >> Thanks.  And this is what really "gets to me" about the docs.  Nowhere in
> >> the docs does it say you need to add code to show th

[jQuery] Re: All div content showing up in jQuery Tabs



Klaus, a couple points:

First, let me state that it appears that I do see content being changed on
click of each tab.  That is NOT my problem here.

1) if it's the span tags you're referring to, I tried that by wrapping the
spans either around text or an image and it made no diff.  When I click on a
tab, I do see the content dive changing..the problem is still that the dive
are not hidden and all 3 referenced divs are exposed as you can see in my
screen shot.  So the clicking seems to work...it's that the divs are not
being hidden/shown correctly
2) I even tried the code as I stated right out of the example on the jquery
tabs page.  Same results.  Now you're saying I changed something there?  No
way man.

So maybe you don't understand MY problem still?  Yes frustrated and
sometimes we should all be allotted to be a little human at times ay?

Klaus Hartl-4 wrote:
> 
> 
> There's no need for all this ranting. You're simply not meeting the
> markup requirements to make the tabs work.
> 
> A tab has to look like:
> 
>  #fragment-identifier A Tab 
> 
> I m pretty sure the documentation is showing this fact and I don't
> understand why you took "straight code out of the example" and then
> changed it to not work. Indeed "Nowhere in
> the docs does it say you need to add code to show the first default
> tab and
> div." because you don't need to as long as you're using the proper
> markup.
> 
> 
> --Klaus
> 
> 
> 
> On 3 Apr., 07:32, expresso  wrote:
>> I mean really if you take the straight code out of the example and try to
>> run
>> this, it doesn't even work!  So how are we to even use the docs?  Under
>> the
>> "Example" here:http://docs.jquery.com/UI/Tabs#events that code works
>> there
>> but when I try this in my own page, I get the same issues.
>>
>> 
>> 
>> 
>>   > href="http://jqueryui.com/latest/themes/base/ui.all.css"; rel="stylesheet"
>> />
>>   > src="http://jqueryui.com/latest/jquery-1.3.2.js";>
>>   > src="http://jqueryui.com/latest/ui/ui.core.js";>
>>   > src="http://jqueryui.com/latest/ui/ui.tabs.js";>
>>   
>>   $(document).ready(function(){
>>     $("#tabs").tabs();
>>   });
>>   
>> 
>> 
>>
>> 
>>     
>>         One
>>         Two
>>         Three
>>     
>>     
>>         First tab is active by default:
>>         $('#example').tabs();
>>     
>>     
>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> diam
>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> volutpat.
>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> diam
>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> volutpat.
>>     
>>     
>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> diam
>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> volutpat.
>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> diam
>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> volutpat.
>>         Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
>> diam
>> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
>> volutpat.
>>     
>> 
>> 
>> 
>>
>> Thanks.  And this is what really "gets to me" about the docs.  Nowhere in
>> the docs does it say you need to add code to show the first default tab
>> and
>> div.  In fact the docs show you an example with example code of tabs
>> working
>> without it.
>>
>> So then why should we assume we have to write all this extra code just to
>> specify the default to load and others hidden when the docs don't even
>> show
>> that?
>>
>> I can see all the events, etc. on that page, but nowhere especially in
>> the
>> examples does it say you have to do anything other than add the following
>> script to your page along with the structure of hyperlink-to-div id
>> matchup:
>>
>>   $(document).ready(function(){
>>     $("#tabs").tabs();
>>   });
>>   
>>
>> so how does one "infer" to have to create all this extra code to get
>> basic
>> features to work when the own docs are showing you none of that!?
>>
>> If I have to hack in more jQuery to do this, then the docs should be
>> forthcoming and tell me this instead of giving me examples that
>> essentially
>> point me in a direction of "it works like this" instead of "you need to
>> code
>> a ton more to get this to work like this" type of deal.  How do I know
>> that?
>> I'm not trying to do anything here outside of get the basic tabs working
>> and
>> default  to show!  By what I infer from the docs, this is all I
>> need!
>>
>> I mean is that example ONLY working because it's using the jquery css
>> (> type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css";
>> rel="stylesheet" />) in there and the jQuery tabs plugin can

[jQuery] Re: Problem validating checkbox before allowing submit of form


Anyone? Pretty please :)



On Apr 3, 9:16 am, osu  wrote:
> Hi,
>
> I'm trying to validate a checkbox before going to checkout in a shop
> (without using the validate plugin), but the JQuery doesn't seem to be
> working at all (i.e. nothing happens). Tried debugging in Firebug, but
> I can't seem to pinpoint the problem.
>
> Can someone have a look and see what I'm doing wrong please?
>
> Thanks,
>
> osu
>
> HTML:
>
> 
> 
> 
> Continue shopping
> 
> 
> Please confirm you have read and
> understood our Terms and Conditions (required)
> 
> 
>
> JQUERY:
>
>         
>         //                 // JQuery function to test if t-and-c checkbox checked
>                 $(document).ready(function(){
>                         $("input[checkout]").click(function(){
>                                 var pass = false;
>                                 if ($("#accept-t-and-c").attr("checked") !== 
> true){
>                                         alert("You have to agree to our terms 
> and conditions to make a
> purchase!");
>                                 } else
>                                 // let 'em through to checkout
>                                 pass = true;
>                         });
>                 });
>         //]]>
>         


  1   2   >