[jQuery] Google map throwing exception

2009-10-01 Thread Mohd.Tareq
Hi All,

I am trying google map with JQuery Model window.

I have written some script to view google map with model window. Bellow
steps are

1 - Click on link, (onclick event I am calling a javascript function to show
google map with model window)

function showGoogleMap(id,lat,long){
   try{
map = new GMap2(document.getElementById(map));
var point = new GLatLng(lat, long);  //default loaction to india
map.setCenter(point, 8);
map.addControl(new GMapTypeControl(1));
//map.addControl(new GLargeMapControl());
map.addControl(new GScaleControl(200));

var marker = new GMarker(point);

map.addOverlay(marker);
map.setCenter(point, 4);
//marker.openInfoWindowHtml(address);
   }catch(e){
alert('Exception '+e);
   }
   $(#googleMap).modal();
}

2 - After occuring above function its giving exception
*a is null*
*function zh(a){for(var b;b=a.firstChild;){yh(b);a.removeChild(b)}}*
**
Any body have any Idea for this issue...

Plz help



   Regard
Mohammad.Tareque


[jQuery] Re: JQuery sliding div issue

2009-10-01 Thread sneaks

i didnt test your code but if you say it works then i think you just
need a resize listener:

$(window).resize(function(){
 // do stuff
});

cheers
j



On Sep 30, 12:23 pm, jpearson311 jpearson...@hotmail.com wrote:
 Hi all.  JQuery noob here.  I'm building a site right now that has a
 left column navigation and the navigation is nested inside a div,
 which is nested inside a table cell (i.e., td).  I'm using JQuery to
 make it so when the user scrolls down the page, the div slides down
 smoothly and always stays at the top of the page.  I have this
 working just fine, but when I change resolutions (i.e., 1024x768), the
 div scrolls over the bottom of the page, which is what I don't want.
 How can I calculate in order for the div to know when it hast reached
 the bottom of the table cell?  I tried using outerHeight to calculate
 the height of the table cell and then subtracting the height of the
 div from it, but I'm clearly doing it wrong because it's still not
 working.  You can view the page I'm referring to 
 atwww.ts24.com/watersedge/overview.cfm.
 The JS code I'm using is below.  If anyone has any pointers, I'd
 really appreciate it.  Thanks!

 Jesse

 var name = #scroller;
 var menu_top_limit = 0;
 var menu_bottom_limit = $('#holder  #scroller').outerHeight() - 560;
 var menu_top_margin     = -15;
 var menu_shift_duration = 500;
 var menuYloc = null;
 ///
 $(window).scroll(function()
 {
         // Calculate the top offset, adding a limit
         offset = menuYloc + $(document).scrollTop() + menu_top_margin;

         // Limit the offset to 0 pixels...
         // This keeps the menu within it's containing TD boundaries
         if(offset  menu_top_limit){
                 offset = menu_top_limit;

         // Give it the PX for pixels:
         offset += px;
         }

         /*else if(offset  menu_bottom_limit){
                 offset = menu_bottom_limit;

                 offset += px;
         }*/

         // Animate:
         $(name).animate({top:offset},
 {duration:menu_shift_duration,queue:false});


[jQuery] Re: Form Validation

2009-10-01 Thread Jörn Zaefferer

Take a look at the errorPlacement option, documented here:
http://docs.jquery.com/Plugins/Validation/validate#toptions

Jörn

On Thu, Oct 1, 2009 at 12:53 AM, Samuurai djbe...@gmail.com wrote:

 Hi,

 I have got some very rudimentary validation working with JQuery
 validation, however, by default, it creates some label tags with the
 error messages in them, right next to the input tags which have
 errors.

 How can I control where these error messages are displayed, as they're
 inside the same div as the input tag which is causing display issues.

 I'm very new to JQuery so please elaborate a little bit if you can.

 Thanks!

 B


[jQuery] Re: superfish

2009-10-01 Thread glimbeek

I don't know for sure but I couldn't see why not...
Search this group or start your own topic.

On 30 sep, 16:09, sanni46 susanne.goed...@ozlo.de wrote:
 Hallo,
 I would like to have two vertical superfish-menu-modules in one
 template on the left hand side..
 I tried it, the first menu with superfish-menu works.
 But when I prepare the second menu, deactivate, and go to Extensions
 - modules - new - superfish, choose the parameter of the menu and
 save, I loose my website and only the menu is shown in the left corner
 and:

 Fatal error: Cannot redeclare hasvalue() (previously declared in /www/
 htdocs/w00baa07/joomla/modules/mod_superfishmenu/helper.php:214) in /
 www/htdocs/w00baa07/joomla/modules/mod_superfishmenu/helper.php on
 line 214

 What does it mean?

 Is it possible to have two or more superfish-Menu-modules in one
 template?

 buy


[jQuery] Re: superfish

2009-10-01 Thread glimbeek

Thanks for the reply. I do have other code on my page but if I remove
it all nothing changes, if I remove the tracking code the error
disappears... I'll google some more :/

On 29 sep, 19:09, Nalum mallon.l...@gmail.com wrote:
 Goolge tracking code is the cause of that error, I've come across this
 before and have contacted google about it and they said it was
 something to do with a script on my page but the only script on my
 page was the google tacking code.

 On Sep 29, 12:52 pm, glimbeek gvanlimb...@gmail.com wrote:

  I may not have to do with the Superfish module, did some testing and
  it looks like the Google tracking code is causing the errors... not a
  100% sure though.

  On 29 sep, 10:28, glimbeek gvanlimb...@gmail.com wrote:

   If I refresh my page in IE6 or IE7 I get a javascript error:
   Error: '_gat' is undifined.

   The line and the amount of chars differs at times.


[jQuery] How to manipulate an object containaing HTML

2009-10-01 Thread Julien

Hello,

i'm trying to find out how to edit (manipulate DOM) of an HTML ajax
result.

What i have is the following :

$('a').live('click',function(e){
var link = this;
$.ajax({
  url: testAjax.html,
  cache: false,
  data: 'href='+this.href,
  success: function(html){

 html.appendTo(#myTable);

  }
});
e.preventDefault();
  })

Which returns rows of a table :

tr
  td/td
  td/td
/tr
tr
  td/td
  td/td
/tr

What i would like to do is before appending to the table something
like that :

$(html).$(td).css('padding-left','80px');

I can't find how to do that. I tried using the find function but it
only return the td in the example.

It's probably very simple but i can't find it anywhere...

Any help much appreciated!


[jQuery] Re: Callback Function had a look but don't get it

2009-10-01 Thread Jon Banner
the link should have it's normal state and actions when you don't return
false, as in the example code you provided.
If you want to add a call back to fire after the fade out:

$(function() { // document is ready for load
  $('a').click(function() {
$('.box').fadeOut(slow, function(){
   callback();
   });
   });
});

regards,
Jon

2009/10/1 jessie mi...@optusnet.com.au


 Ok i'm nearly there LOL

 i have the link and a box which i want to foundOut as my function.

 All works dandy now :)

 But whatif i wanted after i clicked on the link to go to its normal
 state?

 Well i went to the jquery site but i don't think its designed for TRUE
 beginners like myself

 It talks about Callback function and its displayed like this

 function callback() {
  this; // dom element
 }

 So here is my code and where do i put this callBack? and do i need to
 add a class to it?
 $(function() { // document is ready for load
   $('a').click(function() {
 $('.box').fadeOut(slow);



 });
 });

 Jessie


[jQuery] Simple accordion sooo many which one?

2009-10-01 Thread jessie

Hi

I would love to implement the *accordion menu*

The menu is dynamic and its already there  i'm using css to style.

So, i saw quite a few accordions but none that don't have panels... in
other words i'd like the same function without the coloured panels.

Which is the best *plugin to use for this*? the levels of the li's are
dynamic.  So the code would need to be in here.  Maybe if i could have
the same function as the panels but have icons next to the headings
instead of the background colour?

Hope i'm making sense!

Here is my html
!-- BEGIN: categories --
h3 id=SBCategoriesspan/spanBrowse by Category/h3
ul id=menu
li
a href=index.php{LANG_HOME}/a
/li
!-- BEGIN: a --
!-- BEGIN: ul_start --
ul!-- END: ul_start --
!-- BEGIN: li_start --
li
!-- END: li_start --
a href=index.php?_a=viewCatamp;catId={DATA.cat_id}{DATA.cat_name}
({DATA.noProducts})/a
!-- BEGIN: li_end --
/li
!-- END: li_end --
!-- BEGIN: ul_end --
/ul
/li
!-- END: ul_end --
!-- END: a --
/ul
/div
!-- END: categories --

Thank-you

Jess


[jQuery] Underline links of dynamic HTML introduced in the DOM

2009-10-01 Thread SmiThiCo

Hi all,
Till now I din not found and an clean solution for my problem.

I have a button in my web site underline links that changes all the
links and affects its text decoration to 'underline'. From this point
all the links of the website should be underline. The problem is that
I can only make it work for the current DOM. If I introduce new links
into the DOM I need to select them specifically to change its text
decoration. Is there something similar to the live function in
jquery? For instance for every links introduced in the DOM I want to
check if the website is in underline mode. Case its true, the text
decoration will be changed!

Thanks in advance!

SmiThiCo


[jQuery] Superfish issues in ie6 and 7

2009-10-01 Thread neonwiredpixels

In ie6 and 7 only i have issues with the menus closing while the mouse
is over them at certain points as if there is a gap in between the
list items. This makes using the menu impossible as they almost
immediately close. Gaps in vertical lists is a known issue with ie,
does anyone know is this is the cause and how to go about fixing this?


[jQuery] Re: TableSorter and colspans

2009-10-01 Thread Konstantin K

Hi Christian,

I was wondering if you know to when expect the next version that
supports colspan?
I'm using your great plugin, but need colspan support.

Thanks,
Konstantin


On Sep 7, 4:45 am, Christian Bach christian.b...@polyester.se wrote:
 Hi Mike.

 Tablesorter used to support colspan until i found a bug in the
 checkCellColSpan function. I quick fixed it by removing the function called
 and forgot to update the docs.

 I have a new implementation on the way.

 Regards
 Christian

 2009/9/5 Mike Alsup mal...@gmail.com



   Ive used the tablesorter alot in my projects, and Ive had the need for
   this as well.
   I found a DataTables plugin which looks like it can do colspans, but I
   havent tried it.
   I actually looked after reading your post to see if it supported the
   colspans now, as earlier versions didnt and I see it looks like it
   does.

  I figured out how to get this working in my project via TableSorter's
  textExtraction option.  Would like to understand why the docs claim to
  support this however.

 --
 Christian Bach

 Polyester*
 Wittstocksgatan 2nb
 11524 Stockholm, Sweden
 +46 70 443 91 90


[jQuery] Can't load a page from a loaded page.

2009-10-01 Thread smwithdm

I'm trying to load a page using the .load(url) from an already loaded
page, but nothing responds. Below is a simple sample page created to
show what I want to accomplish.
Also, I'm using JQuery 1.3.

- index.html -
html
head
script type=text/javascript src=jquery.js/script
script type=text/javascript
$(document).ready(function() {
$(#mainview).load(page01.html);
$(#clickme).click(function(){
$(#mainview).load(page02.html);
});
$(#clickme2).click(function(){
$(#mainview).load(page03.html);
});
$(#clickme3).click(function(){
$(#mainview).load(page04.html);
});
});
/script
/head
body
div id=mainview/div
/body
/html

- END of index.html -

- page01.html -

htmlhead/headbody
pThis is page01.html/p
div id=clickmeClick Me!/div
psome stuffs/p
/body
/html

- END of page01.html -

- page02.html -

htmlhead/headbody
pThis is page02.html/p
div id=clickme2Click Me!/div
psome more stuffs again/p
/body
/html

- END of page02.html -

- page03.html -

htmlhead/headbody
pThis is page03.html/p
div id=clickme3Click Me!/div
psome more stuffs again/p
/body
/html

- END of page03.html -

When the index.html page loads up, the page01.html loads into
#mainview.
And when I try to click on the div id=clickmeClick Me!/div
inside page01.html to load page02.html, nothing works.

Just can't figure out what's wrong... If someone knows an easy trick,
please help me out. Thank You!


[jQuery] Superfish customization: change display height of submenu

2009-10-01 Thread Jacco


Hi All,

I am new to jQuery  Superfish, but it seemd like the most logical way
to do a quick prototype for a menusystem. I am trying to create a
verertical menu system (using superfish-vertical). However, I'd like
to tweak the behaviour of the submenu, and have been unsuccessful so
far. Here's what the current solution does (straight out of the box) -
assume menu item 3 is hovered over:

  menu item 1 
  menu item 2 
[ menu item 3  ] menu item 3.1
  menu item 4menu item 3.2
  menu item 5menu item 3.3
  menu item 6menu item 3.4
  menu item 3.5
  menu item 3.6

Normal, expected behaviour. But I would like to use this type of menu
in a vertically restricted area, and therefore try to place the
submenu in such a way that it still fits. I am aware of many
restictions that apply when I go about this (submenu can never be more
items than the main menu, for instance), but let's assume I can
control that.

So, I would like the submenu to take into accoutn the height of the
available space. Two examples, for menu item 3  menu item 6:

  menu item 1menu item 3.1
  menu item 2menu item 3.2
[ menu item 3  ] menu item 3.3
  menu item 4menu item 3.4
  menu item 5menu item 3.5
  menu item 6menu item 3.6

  menu item 1 
  menu item 2 
  menu item 3menu item 6.1
  menu item 4menu item 6.2
  menu item 5menu item 6.3
[ menu item 6  ] menu item 6.4

Is this possible? I cannot find the code that determines the top of
the new div that is being displayed (probably due to my newness to
jQuery  Superfish). But any pointers would be greatly appreciated!

Thanks in advance,

Jacco


[jQuery] Re: Form Validation

2009-10-01 Thread Samuurai

Thanks Jorn I'm looking at that, however I think I've devised another
method.

I need this code to be run on each offending field:

$('[for=name]').parents('.grid-26') // for=name is the selctor for
the label.
.prepend('pPlease write your real name/p')
.wrapInner('div class=error/div');
});

I only really have a background in PHP, so in PHP terms, how do I do
aforeach ($errors as $error) and then call the above code with the
selector and the error message?

Thanks!

Beren

On Oct 1, 9:01 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Take a look at the errorPlacement option, documented 
 here:http://docs.jquery.com/Plugins/Validation/validate#toptions

 Jörn

 On Thu, Oct 1, 2009 at 12:53 AM, Samuurai djbe...@gmail.com wrote:

  Hi,

  I have got some very rudimentary validation working with JQuery
  validation, however, by default, it creates some label tags with the
  error messages in them, right next to the input tags which have
  errors.

  How can I control where these error messages are displayed, as they're
  inside the same div as the input tag which is causing display issues.

  I'm very new to JQuery so please elaborate a little bit if you can.

  Thanks!

  B


[jQuery] Re: Underline links of dynamic HTML introduced in the DOM

2009-10-01 Thread Jonathan Vanherpe (T T NV)


SmiThiCo wrote:


Hi all,
Till now I din not found and an clean solution for my problem.

I have a button in my web site underline links that changes all the
links and affects its text decoration to 'underline'. From this point
all the links of the website should be underline. The problem is that
I can only make it work for the current DOM. If I introduce new links
into the DOM I need to select them specifically to change its text
decoration. Is there something similar to the live function in
jquery? For instance for every links introduced in the DOM I want to
check if the website is in underline mode. Case its true, the text
decoration will be changed!

Thanks in advance!

SmiThiCo



$('body').addClass('underlinelinks');

and

style type=text/css
.body a {
text-decoration: underline;
}
/style

--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] Re: Underline links of dynamic HTML introduced in the DOM

2009-10-01 Thread Jonathan Vanherpe (T T NV)


SmiThiCo wrote:


Hi all,
Till now I din not found and an clean solution for my problem.

I have a button in my web site underline links that changes all the
links and affects its text decoration to 'underline'. From this point
all the links of the website should be underline. The problem is that
I can only make it work for the current DOM. If I introduce new links
into the DOM I need to select them specifically to change its text
decoration. Is there something similar to the live function in
jquery? For instance for every links introduced in the DOM I want to
check if the website is in underline mode. Case its true, the text
decoration will be changed!

Thanks in advance!

SmiThiCo



I obviously meant:

.underlinelinks a   {
text-decoration: underline;
}

--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] Difference between Accordion Widget UI and Accordion Plugin?

2009-10-01 Thread jessie

Can someone please explain to me the difference between the two?

I just finished an online tutorial on Accordian Widget UI and it
looked quite simple.

Thanks
Jess


[jQuery] Re: compare variables

2009-10-01 Thread Jon Banner
make friends with regular expressions.
http://en.wikipedia.org/wiki/Regular_expression


2009/9/30 Poloman bigtrouble1...@gmail.com


 I have

 varA = com and varB=com55 or ton2 or son1.9 or whatever values...

 I want to do a comparison if the prefix of varB = com, which is varA,
 then do something. How can i write the code for this ?


[jQuery] Re: Difference between Accordion Widget UI and Accordion Plugin?

2009-10-01 Thread Richard D. Worth
When you say 'Accordion Widget UI' do you mean jQuery UI Accordion? Also, a
link to the online tutorial might help us identify at least one that you're
trying to compare.
- Richard

On Thu, Oct 1, 2009 at 7:34 AM, jessie mi...@optusnet.com.au wrote:


 Can someone please explain to me the difference between the two?

 I just finished an online tutorial on Accordian Widget UI and it
 looked quite simple.

 Thanks
 Jess


[jQuery] Re: Difference between Accordion Widget UI and Accordion Plugin?

2009-10-01 Thread jessie

Yes the 'jQuery UI Accordion...

here is the link 
http://www.practicalecommerce.com/articles/1213-Web-Design-Tips-jQuery-UI-Accordion-Widget

The problem now is that even though i like the functionality i can't
seem to incorporate it to my template. :(

I have an ecommerce site driven by php and the html are tpl files
which i need to edit.

This is what i have in my tpl files so you can see what i mean

!-- BEGIN: categories --
h3 id=SBCategoriesspan/spanBrowse by Category/h3

ul id=mainmenu-nav style=overflow:hidden; background-color:red;
li class=li-nav style=background-color:blue;a href=index.php
{LANG_HOME}/a/li
!-- BEGIN: a --
!-- BEGIN: ul_start --
ul class=ul-nav
!-- END: ul_start --
!-- BEGIN: li_start --
li class=li-nav
!-- END: li_start --
a href=index.php?_a=viewCatamp;catId={DATA.cat_id}{DATA.cat_name}
({DATA.noProducts})/a
!-- BEGIN: li_end --
/li
!-- END: li_end --
!-- BEGIN: ul_end --
/ul
/li
!-- END: ul_end --
!-- END: a --
!-- BEGIN: gift_certificates --
li class=li-nav a href=index.php?_a=giftCert{LANG_GIFT_CERTS}/
a/li
!-- END: gift_certificates --
!-- BEGIN: sale --
li class=li-nav a href=index.php?_a=viewCatamp;catId=saleItems
{LANG_SALE_ITEMS}/a/li
!-- END: sale --
/ul
!-- END: categories --

Jess

On Oct 1, 9:54 pm, Richard D. Worth rdwo...@gmail.com wrote:
 When you say 'Accordion Widget UI' do you mean jQuery UI Accordion? Also, a
 link to the online tutorial might help us identify at least one that you're
 trying to compare.
 - Richard

 On Thu, Oct 1, 2009 at 7:34 AM, jessie mi...@optusnet.com.au wrote:

  Can someone please explain to me the difference between the two?

  I just finished an online tutorial on Accordian Widget UI and it
  looked quite simple.

  Thanks
  Jess


[jQuery] Re: Simple accordion sooo many which one?

2009-10-01 Thread jessie

Sorry i should add i'm using CubeCart as my platform for ecommerce

On Oct 1, 10:05 pm, Richard D. Worth rdwo...@gmail.com wrote:
 You can use the jQuery UI Accordion (http://jqueryui.com/demos/accordion/)
 Here's a sample of it without any styling:

 http://jsbin.com/owose

 The html and javascript is the same. It's just that I've only included the
 base part of a jQuery UI theme, that includes functional/layout css, but no
 look-and-feel/styling (read: color). If you want the icons, you could
 include the whole theme, and then just override the header and content
 section to not have a background and border:

 http://jsbin.com/ijeci

 - Richard

 On Thu, Oct 1, 2009 at 6:02 AM, jessie mi...@optusnet.com.au wrote:

  Hi

  I would love to implement the *accordion menu*

  The menu is dynamic and its already there  i'm using css to style.

  So, i saw quite a few accordions but none that don't have panels... in
  other words i'd like the same function without the coloured panels.

  Which is the best *plugin to use for this*? the levels of the li's are
  dynamic.  So the code would need to be in here.  Maybe if i could have
  the same function as the panels but have icons next to the headings
  instead of the background colour?

  Hope i'm making sense!

  Here is my html
  !-- BEGIN: categories --
  h3 id=SBCategoriesspan/spanBrowse by Category/h3
  ul id=menu
  li
  a href=index.php{LANG_HOME}/a
  /li
  !-- BEGIN: a --
  !-- BEGIN: ul_start --
  ul!-- END: ul_start --
  !-- BEGIN: li_start --
  li
  !-- END: li_start --
  a href=index.php?_a=viewCatamp;catId={DATA.cat_id}{DATA.cat_name}
  ({DATA.noProducts})/a
  !-- BEGIN: li_end --
  /li
  !-- END: li_end --
  !-- BEGIN: ul_end --
  /ul
  /li
  !-- END: ul_end --
  !-- END: a --
  /ul
  /div
  !-- END: categories --

  Thank-you

  Jess


[jQuery] Re: Simple accordion sooo many which one?

2009-10-01 Thread Richard D. Worth
You can use the jQuery UI Accordion ( http://jqueryui.com/demos/accordion/ )
Here's a sample of it without any styling:

http://jsbin.com/owose

The html and javascript is the same. It's just that I've only included the
base part of a jQuery UI theme, that includes functional/layout css, but no
look-and-feel/styling (read: color). If you want the icons, you could
include the whole theme, and then just override the header and content
section to not have a background and border:

http://jsbin.com/ijeci

- Richard

On Thu, Oct 1, 2009 at 6:02 AM, jessie mi...@optusnet.com.au wrote:


 Hi

 I would love to implement the *accordion menu*

 The menu is dynamic and its already there  i'm using css to style.

 So, i saw quite a few accordions but none that don't have panels... in
 other words i'd like the same function without the coloured panels.

 Which is the best *plugin to use for this*? the levels of the li's are
 dynamic.  So the code would need to be in here.  Maybe if i could have
 the same function as the panels but have icons next to the headings
 instead of the background colour?

 Hope i'm making sense!

 Here is my html
 !-- BEGIN: categories --
 h3 id=SBCategoriesspan/spanBrowse by Category/h3
 ul id=menu
 li
 a href=index.php{LANG_HOME}/a
 /li
 !-- BEGIN: a --
 !-- BEGIN: ul_start --
 ul!-- END: ul_start --
 !-- BEGIN: li_start --
 li
 !-- END: li_start --
 a href=index.php?_a=viewCatamp;catId={DATA.cat_id}{DATA.cat_name}
 ({DATA.noProducts})/a
 !-- BEGIN: li_end --
 /li
 !-- END: li_end --
 !-- BEGIN: ul_end --
 /ul
 /li
 !-- END: ul_end --
 !-- END: a --
 /ul
 /div
 !-- END: categories --

 Thank-you

 Jess


[jQuery] Re: Difference between Accordion Widget UI and Accordion Plugin?

2009-10-01 Thread Richard D. Worth
Ok, in that case there's a dedicated list for help with jQuery UI plugins:
http://groups.google.com/group/jquery-ui

http://groups.google.com/group/jquery-uiSorry to have you post twice, but
that way it'll reach the right people and the answer (once given) will be in
the right archive. Thanks.

- Richard

On Thu, Oct 1, 2009 at 8:13 AM, jessie mi...@optusnet.com.au wrote:


 Yes the 'jQuery UI Accordion...

 here is the link
 http://www.practicalecommerce.com/articles/1213-Web-Design-Tips-jQuery-UI-Accordion-Widget

 The problem now is that even though i like the functionality i can't
 seem to incorporate it to my template. :(

 I have an ecommerce site driven by php and the html are tpl files
 which i need to edit.

 This is what i have in my tpl files so you can see what i mean

 !-- BEGIN: categories --
 h3 id=SBCategoriesspan/spanBrowse by Category/h3

 ul id=mainmenu-nav style=overflow:hidden; background-color:red;
 li class=li-nav style=background-color:blue;a href=index.php
 {LANG_HOME}/a/li
 !-- BEGIN: a --
 !-- BEGIN: ul_start --
 ul class=ul-nav
 !-- END: ul_start --
 !-- BEGIN: li_start --
 li class=li-nav
 !-- END: li_start --
 a href=index.php?_a=viewCatamp;catId={DATA.cat_id}{DATA.cat_name}
 ({DATA.noProducts})/a
 !-- BEGIN: li_end --
 /li
 !-- END: li_end --
 !-- BEGIN: ul_end --
 /ul
 /li
 !-- END: ul_end --
 !-- END: a --
 !-- BEGIN: gift_certificates --
 li class=li-nav a href=index.php?_a=giftCert{LANG_GIFT_CERTS}/
 a/li
 !-- END: gift_certificates --
 !-- BEGIN: sale --
 li class=li-nav a href=index.php?_a=viewCatamp;catId=saleItems
 {LANG_SALE_ITEMS}/a/li
 !-- END: sale --
 /ul
 !-- END: categories --

 Jess

 On Oct 1, 9:54 pm, Richard D. Worth rdwo...@gmail.com wrote:
  When you say 'Accordion Widget UI' do you mean jQuery UI Accordion? Also,
 a
  link to the online tutorial might help us identify at least one that
 you're
  trying to compare.
  - Richard
 
  On Thu, Oct 1, 2009 at 7:34 AM, jessie mi...@optusnet.com.au wrote:
 
   Can someone please explain to me the difference between the two?
 
   I just finished an online tutorial on Accordian Widget UI and it
   looked quite simple.
 
   Thanks
   Jess



[jQuery] Re: Simple accordion sooo many which one?

2009-10-01 Thread Richard D. Worth
If you decide to use it and have any further questions about jQuery UI
Accordion or jQuery UI themes and styling, please ask on
http://groups.google.com/group/jquery-ui

Thanks.

http://groups.google.com/group/jquery-ui- Richard

On Thu, Oct 1, 2009 at 8:05 AM, Richard D. Worth rdwo...@gmail.com wrote:

 You can use the jQuery UI Accordion ( http://jqueryui.com/demos/accordion/
  )
 Here's a sample of it without any styling:

 http://jsbin.com/owose

 The html and javascript is the same. It's just that I've only included the
 base part of a jQuery UI theme, that includes functional/layout css, but no
 look-and-feel/styling (read: color). If you want the icons, you could
 include the whole theme, and then just override the header and content
 section to not have a background and border:

 http://jsbin.com/ijeci

 - Richard


 On Thu, Oct 1, 2009 at 6:02 AM, jessie mi...@optusnet.com.au wrote:


 Hi

 I would love to implement the *accordion menu*

 The menu is dynamic and its already there  i'm using css to style.

 So, i saw quite a few accordions but none that don't have panels... in
 other words i'd like the same function without the coloured panels.

 Which is the best *plugin to use for this*? the levels of the li's are
 dynamic.  So the code would need to be in here.  Maybe if i could have
 the same function as the panels but have icons next to the headings
 instead of the background colour?

 Hope i'm making sense!

 Here is my html
 !-- BEGIN: categories --
 h3 id=SBCategoriesspan/spanBrowse by Category/h3
 ul id=menu
 li
 a href=index.php{LANG_HOME}/a
 /li
 !-- BEGIN: a --
 !-- BEGIN: ul_start --
 ul!-- END: ul_start --
 !-- BEGIN: li_start --
 li
 !-- END: li_start --
 a href=index.php?_a=viewCatamp;catId={DATA.cat_id}{DATA.cat_name}
 ({DATA.noProducts})/a
 !-- BEGIN: li_end --
 /li
 !-- END: li_end --
 !-- BEGIN: ul_end --
 /ul
 /li
 !-- END: ul_end --
 !-- END: a --
 /ul
 /div
 !-- END: categories --

 Thank-you

 Jess





[jQuery] Re: Difference between Accordion Widget UI and Accordion Plugin?

2009-10-01 Thread jessie

Ok so i should post the whole thing there then? would they be able to
help me incorporate the accordian menu with my cubecart template?

Thank-you for your help :)

JessOn Oct 1, 10:18 pm, Richard D. Worth rdwo...@gmail.com wrote:
 Ok, in that case there's a dedicated list for help with jQuery UI 
 plugins:http://groups.google.com/group/jquery-ui

 http://groups.google.com/group/jquery-uiSorry to have you post twice, but
 that way it'll reach the right people and the answer (once given) will be in
 the right archive. Thanks.

 - Richard

 On Thu, Oct 1, 2009 at 8:13 AM, jessie mi...@optusnet.com.au wrote:

  Yes the 'jQuery UI Accordion...

  here is the link
 http://www.practicalecommerce.com/articles/1213-Web-Design-Tips-jQuer...

  The problem now is that even though i like the functionality i can't
  seem to incorporate it to my template. :(

  I have an ecommerce site driven by php and the html are tpl files
  which i need to edit.

  This is what i have in my tpl files so you can see what i mean

  !-- BEGIN: categories --
  h3 id=SBCategoriesspan/spanBrowse by Category/h3

  ul id=mainmenu-nav style=overflow:hidden; background-color:red;
  li class=li-nav style=background-color:blue;a href=index.php
  {LANG_HOME}/a/li
  !-- BEGIN: a --
  !-- BEGIN: ul_start --
  ul class=ul-nav
  !-- END: ul_start --
  !-- BEGIN: li_start --
  li class=li-nav
  !-- END: li_start --
  a href=index.php?_a=viewCatamp;catId={DATA.cat_id}{DATA.cat_name}
  ({DATA.noProducts})/a
  !-- BEGIN: li_end --
  /li
  !-- END: li_end --
  !-- BEGIN: ul_end --
  /ul
  /li
  !-- END: ul_end --
  !-- END: a --
  !-- BEGIN: gift_certificates --
  li class=li-nav a href=index.php?_a=giftCert{LANG_GIFT_CERTS}/
  a/li
  !-- END: gift_certificates --
  !-- BEGIN: sale --
  li class=li-nav a href=index.php?_a=viewCatamp;catId=saleItems
  {LANG_SALE_ITEMS}/a/li
  !-- END: sale --
  /ul
  !-- END: categories --

  Jess

  On Oct 1, 9:54 pm, Richard D. Worth rdwo...@gmail.com wrote:
   When you say 'Accordion Widget UI' do you mean jQuery UI Accordion? Also,
  a
   link to the online tutorial might help us identify at least one that
  you're
   trying to compare.
   - Richard

   On Thu, Oct 1, 2009 at 7:34 AM, jessie mi...@optusnet.com.au wrote:

Can someone please explain to me the difference between the two?

I just finished an online tutorial on Accordian Widget UI and it
looked quite simple.

Thanks
Jess


[jQuery] Re: Difference between Accordion Widget UI and Accordion Plugin?

2009-10-01 Thread jessie

If i use an Accordian Plugin can someone please help me implement it
into my cubecart template file?

Thanks
Jess

On Oct 1, 10:23 pm, jessie mi...@optusnet.com.au wrote:
 Ok so i should post the whole thing there then? would they be able to
 help me incorporate the accordian menu with my cubecart template?

 Thank-you for your help :)

 JessOn Oct 1, 10:18 pm, Richard D. Worth rdwo...@gmail.com wrote:

  Ok, in that case there's a dedicated list for help with jQuery UI 
  plugins:http://groups.google.com/group/jquery-ui

  http://groups.google.com/group/jquery-uiSorry to have you post twice, but
  that way it'll reach the right people and the answer (once given) will be in
  the right archive. Thanks.

  - Richard

  On Thu, Oct 1, 2009 at 8:13 AM, jessie mi...@optusnet.com.au wrote:

   Yes the 'jQuery UI Accordion...

   here is the link
  http://www.practicalecommerce.com/articles/1213-Web-Design-Tips-jQuer...

   The problem now is that even though i like the functionality i can't
   seem to incorporate it to my template. :(

   I have an ecommerce site driven by php and the html are tpl files
   which i need to edit.

   This is what i have in my tpl files so you can see what i mean

   !-- BEGIN: categories --
   h3 id=SBCategoriesspan/spanBrowse by Category/h3

   ul id=mainmenu-nav style=overflow:hidden; background-color:red;
   li class=li-nav style=background-color:blue;a href=index.php
   {LANG_HOME}/a/li
   !-- BEGIN: a --
   !-- BEGIN: ul_start --
   ul class=ul-nav
   !-- END: ul_start --
   !-- BEGIN: li_start --
   li class=li-nav
   !-- END: li_start --
   a href=index.php?_a=viewCatamp;catId={DATA.cat_id}{DATA.cat_name}
   ({DATA.noProducts})/a
   !-- BEGIN: li_end --
   /li
   !-- END: li_end --
   !-- BEGIN: ul_end --
   /ul
   /li
   !-- END: ul_end --
   !-- END: a --
   !-- BEGIN: gift_certificates --
   li class=li-nav a href=index.php?_a=giftCert{LANG_GIFT_CERTS}/
   a/li
   !-- END: gift_certificates --
   !-- BEGIN: sale --
   li class=li-nav a href=index.php?_a=viewCatamp;catId=saleItems
   {LANG_SALE_ITEMS}/a/li
   !-- END: sale --
   /ul
   !-- END: categories --

   Jess

   On Oct 1, 9:54 pm, Richard D. Worth rdwo...@gmail.com wrote:
When you say 'Accordion Widget UI' do you mean jQuery UI Accordion? 
Also,
   a
link to the online tutorial might help us identify at least one that
   you're
trying to compare.
- Richard

On Thu, Oct 1, 2009 at 7:34 AM, jessie mi...@optusnet.com.au wrote:

 Can someone please explain to me the difference between the two?

 I just finished an online tutorial on Accordian Widget UI and it
 looked quite simple.

 Thanks
 Jess


[jQuery] Re: Tablesorter problems

2009-10-01 Thread Jon Banner
Hi Mike,
it looks as if you have copied and pasted some illegal characters in to your
demo page.
Try removing these and see if that helps.

Best,
Jon

2009/10/1 Mike michael.dimm...@virgin.net


 Is there no one that can help?

 On Sep 30, 4:26 pm, Mike michael.dimm...@virgin.net wrote:
  Hi I have recently come across the tablesorter 2.0 for jquery and have
  decided to use it on my website.  I have the examples to work etc.
  however I would like to exclude the first column of my table from
  being sorted and just to remain static irrespect of the other columns
  being sortable.
 
  I have found this :
 http://stackoverflow.com/questions/437290/exclude-a-column-from-being...
  which is exactly what I needed however when pasting it into my test
  web page I get line 16 parse error (missing before statement).
 
  I have no previous experience of knowledge of jQuery so I would
  appreciate if someone could look at my test page and see what the
  problem is:
 http://www.freebetsextra.co.uk/tablesorter/tests/freebet3.html.
 
  This is the widget I am trying to use:
 
  $(function() {
  // add new widget called indexFirstColumn
  $.tablesorter.addWidget({
  // give the widget a id
  id: indexFirstColumn,
  // format is called when the on init and when a sorting has
  finished
  format: function(table) {
  // loop all tr elements and set the value for the
  first column
  for(var i=0; i  table.tBodies[0].rows.length; i++) {
  $(tbody tr:eq( + (i - 1) + )
  td:first,table).html(i);
  }
  }
  });
 
  $(table).tablesorter({
  widgets: ['zebra','indexFirstColumn']
  });
 
 
 
  });



[jQuery] Re: Can't load a page from a loaded page.

2009-10-01 Thread Chrazy

You have to use the live() event.

So instead of:
  $(#clickme2).click(function(){
 $(#mainview).load(page03.html);
 });

You write:

 $(#clickme2).live('click', function(){
 $(#mainview).load(page03.html);
 });

Functions will just work with objects already in the DOM unless you
bind them with live.

On 1 Okt, 07:45, smwithdm smwit...@gmail.com wrote:
 I'm trying to load a page using the .load(url) from an already loaded
 page, but nothing responds. Below is a simple sample page created to
 show what I want to accomplish.
 Also, I'm using JQuery 1.3.

 - index.html -
 html
 head
 script type=text/javascript src=jquery.js/script
 script type=text/javascript
 $(document).ready(function() {
         $(#mainview).load(page01.html);
         $(#clickme).click(function(){
                 $(#mainview).load(page02.html);
         });
         $(#clickme2).click(function(){
                 $(#mainview).load(page03.html);
         });
         $(#clickme3).click(function(){
                 $(#mainview).load(page04.html);
         });});

 /script
 /head
 body
 div id=mainview/div
 /body
 /html

 - END of index.html -

 - page01.html -

 htmlhead/headbody
 pThis is page01.html/p
 div id=clickmeClick Me!/div
 psome stuffs/p
 /body
 /html

 - END of page01.html -

 - page02.html -

 htmlhead/headbody
 pThis is page02.html/p
 div id=clickme2Click Me!/div
 psome more stuffs again/p
 /body
 /html

 - END of page02.html -

 - page03.html -

 htmlhead/headbody
 pThis is page03.html/p
 div id=clickme3Click Me!/div
 psome more stuffs again/p
 /body
 /html

 - END of page03.html -

 When the index.html page loads up, the page01.html loads into
 #mainview.
 And when I try to click on the div id=clickmeClick Me!/div
 inside page01.html to load page02.html, nothing works.

 Just can't figure out what's wrong... If someone knows an easy trick,
 please help me out. Thank You!


[jQuery] Re: Problem with fade-effects and IE8

2009-10-01 Thread Jon Banner
What version of jQuery are you using? I have not had problems with IE8 using
version 1.3.2, and i've just checked some sites that i've previously worked
on using 1.2.6, and they don't seem to have any problems with fade in or
fade out.

Maybe you have a beta version of IE8?

Jon

2009/9/30 dirknibleck paul.ship...@clickonce.ca


 I am experiencing the same issue with slideToggle and toggle in
 Internet Explorer 8. Were you able to find a resolution?

 On Sep 8, 2:08 am, Boolace bool...@googlemail.com wrote:
  Hi,
 
  I've a problem with the fadeIn() and fadeOut()-commands of jQuery
  usingInternetExplorer8. Firefox, Opera, Safari and IE up to version
  7 works fine.
  I'm not getting an error or something from the console, the effect is
  simply not executed. The elemtent is staying fixed and doesn't hide
  and vice verca.
 
  Any Idea if this is caused in jQuery? Anybody else who has this
  problems?
 
  Thanks and greetings,
 
  Boolace



[jQuery] Re: problem when using inside a popup

2009-10-01 Thread onyafriend

I have the same problem, autocomplete popup is shown  back  of
dialog , how I can show on top?
thanks

On 21 sep, 14:54, Arun mailarunkuma...@gmail.com wrote:
 How did you manage to get it in dialog. Im using Jquery UI 1.7.2
 dialog for me the auto suggest layer displays behind the modal dialog
 overlay. Please let me know how to acheive it?

 On Sep 8, 1:11 pm, Kevin kevin.van.hae...@gmail.com wrote:

  Hello,

  When I usejquery.autocomplete.js on a field that lives inside 
  ajquerymodalpopup, theautocompletelist doesn't stick to the textbox
  when scrolling with the scrollwheel of the mouse.
  Anyone knows if this is a bug, or a configuration issue?

  best regards!

  Kevin


[jQuery] Re: Superfish customization: change display height of submenu

2009-10-01 Thread Charlie





good plugins offer options to hook into events and superfish is one of
those

the submenus are all absolutely positioned to their parent . In
superfish css look for the li:hover ul, sfHover ul etc that reposition
the sub to top=0 when visible. When not visible it has top=-999em

In Superfish API you will find an option "onBeforeShow" that allows you
to create a function where "this" is the sub ul about to be displayed.
Here a function to change the position of the sub can be created

a simple method to align all the subs where all tops will be at top of
overall menu is to first find position of the menu in window

var menuOffset=$('ul.sf-menu').offset().top;
// now you can use the menu container as reference point to align the
other elements

$('ul.sf-menu').superfish({
   
onBeforeShow: function(){ 
// check window offset of the parent li
 var offset=$(this).parent().offset().top
 // adjust top position of sub by difference of offsets
 $(this).css("top",(menuOffset-offset))
 
}

});
good luck!

Jacco wrote:

  
Hi All,

I am new to jQuery  Superfish, but it seemd like the most logical way
to do a quick prototype for a menusystem. I am trying to create a
verertical menu system (using superfish-vertical). However, I'd like
to tweak the behaviour of the submenu, and have been unsuccessful so
far. Here's what the current solution does (straight out of the box) -
assume menu item 3 is hovered over:

  menu item 1 
  menu item 2 
[ menu item 3  ] menu item 3.1
  menu item 4menu item 3.2
  menu item 5menu item 3.3
  menu item 6menu item 3.4
  menu item 3.5
  menu item 3.6

Normal, expected behaviour. But I would like to use this type of menu
in a vertically restricted area, and therefore try to place the
submenu in such a way that it still fits. I am aware of many
restictions that apply when I go about this (submenu can never be more
items than the main menu, for instance), but let's assume I can
control that.

So, I would like the submenu to take into accoutn the height of the
available space. Two examples, for menu item 3  menu item 6:

  menu item 1menu item 3.1
  menu item 2menu item 3.2
[ menu item 3  ] menu item 3.3
  menu item 4menu item 3.4
  menu item 5menu item 3.5
  menu item 6menu item 3.6

  menu item 1 
  menu item 2 
  menu item 3menu item 6.1
  menu item 4menu item 6.2
  menu item 5menu item 6.3
[ menu item 6  ] menu item 6.4

Is this possible? I cannot find the code that determines the top of
the new div that is being displayed (probably due to my newness to
jQuery  Superfish). But any pointers would be greatly appreciated!

Thanks in advance,

Jacco

  






[jQuery] Re: problem when using inside a popup

2009-10-01 Thread onyafriend

I solved adding atribute  z-index:1500 to my divs in
jquery.autocomplet.css because Jquery UI Dialog put z-index between
1000 and 1005
thanks

On 1 oct, 10:36, onyafriend ssinfo.compugr...@gmail.com wrote:
 I have the same problem, autocomplete popup is shown  back  of
 dialog , how I can show on top?
 thanks

 On 21 sep, 14:54, Arun mailarunkuma...@gmail.com wrote:

  How did you manage to get it in dialog. Im using Jquery UI 1.7.2
  dialog for me the auto suggest layer displays behind the modal dialog
  overlay. Please let me know how to acheive it?

  On Sep 8, 1:11 pm, Kevin kevin.van.hae...@gmail.com wrote:

   Hello,

   When I usejquery.autocomplete.js on a field that lives inside 
   ajquerymodalpopup, theautocompletelist doesn't stick to the textbox
   when scrolling with the scrollwheel of the mouse.
   Anyone knows if this is a bug, or a configuration issue?

   best regards!

   Kevin


[jQuery] Re: Underline links of dynamic HTML introduced in the DOM

2009-10-01 Thread SmiThiCo

Thanks. I'll give it a try.
I didn't tried this before because in the inner divs of the body I
sometimes override the text decoration value.
So in terms of css priority I not sure if this is going to work. But
I'll tell you later.

Thanks!

On Oct 1, 1:11 pm, Jonathan Vanherpe (T  T NV) jonat...@tnt.be
wrote:
 SmiThiCo wrote:

  Hi all,
  Till now I din not found and an clean solution for my problem.

  I have a button in my web site underline links that changes all the
  links and affects its text decoration to 'underline'. From this point
  all the links of the website should be underline. The problem is that
  I can only make it work for the current DOM. If I introduce new links
  into the DOM I need to select them specifically to change its text
  decoration. Is there something similar to the live function in
  jquery? For instance for every links introduced in the DOM I want to
  check if the website is in underline mode. Case its true, the text
  decoration will be changed!

  Thanks in advance!

  SmiThiCo

 I obviously meant:

 .underlinelinks a       {
         text-decoration: underline;
         }

 --
 Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Cyril Lopez
2009/10/1 Julien tux...@gmail.com


 Hello,

 i'm trying to find out how to edit (manipulate DOM) of an HTML ajax
 result.

 returns rows of a table :

 tr
  td/td
  td/td
 /tr
 tr
  td/td
  td/td
 /tr

 What i would like to do is before appending to the table something
 like that :

 $(html).$(td).css('padding-left','80px');


I am curious too, to know the best way to manipulate DOM in objects.
In Julien's example how to add class at TD elements ?
Thanks for you help.
Cyril


[jQuery] show and hide div (please help me)

2009-10-01 Thread hamed7

body
form id=form1 name=form1 method=post action=
  p
label
  select name=select id=select
  /select
/label
  /p
  p
label
  select name=select2 id=select2
  /select
/label
  /p
  pnbsp;/p
/formdiv please wait.../div
/body

i have this for example,and i want when user select item from select
show div please wait.../div and when data load complete in select2
then hide div please wait.../div

please help me i am new in jquery , edit my example


[jQuery] jquery ui modal -autocomplete popup

2009-10-01 Thread onyafriend

i have a jquery ui modal, there i have an automcomplete textbox, but
the list is shown back from the modal window, and i can't see it, any
way to put the autocmplete modal inside modal window?
thanks


[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Charlie





you are trying to apply css to something that isn;t in the DOM.
$.css() uses inline style attribute so if there is no html inline the
attribute can't be applied

can you add class name to html server side and use css to pad?
if not you could add class to exisitng td's before insertion of new
html, insert your AJAX, then do something like

$("td").not('existTDClass').css(.

Julien wrote:

  Hello,

i'm trying to find out how to edit (manipulate DOM) of an HTML ajax
result.

What i have is the following :

$('a').live('click',function(e){
var link = this;
$.ajax({
  url: "testAjax.html",
  cache: false,
  data: 'href=''padding-left','80px');

I can't find how to do that. I tried using the find function but it
only return the td in the example.

It's probably very simple but i can't find it anywhere...

Any help much appreciated!

  






[jQuery] Is it possible to use jQuery BlockUI inside a User Control in .NET ?

2009-10-01 Thread Renan

Hello buddys

I am a ASP.NET developer and I would like to use the jQuery BlockUI
inside a generic control, designed to show a popup (with javascript
and CSS effects). My problem is to disable (key tab, enter and mouse
clicks) the parent window (parent element) (my control is inside the
page and does not use iframe).

Inside my control I have a DIV and I show his content when the user
call the method designed.

The problem is: I only see the caller of BlockUI using this type of
eventhandler CLICK, ex:

$('#pageDemo2').click(function() {
$.blockUI({ message: 'h1img src=busy.gif / Just a
moment.../h1' });
test();
});

It is possible apply that property inside the blockUI out of my DIV
(parent element), inside my control, without click ? Is it necessary
to use a iframe?

I try other ways and do not work for me

Regards,


[jQuery] Urgent: Modal Dialog not working in Mozilla

2009-10-01 Thread Debajyoti

Hi,

I am using jquery modal dialog. It is working fine in IE 7 but not in
Mozilla. Do i have to add anything to it. In mozilla, the pop up is
dissapearing after sometime(4-5 secs).

Can any one help me in this as this is quite urgent

Thanks,
Debajyoti


[jQuery] Skipping a slide with Cycle Plugin

2009-10-01 Thread Garrison Locke

Does anyone know how to disable a slide or skip one based on some
dynamic piece of information?  For example, I want to skip a
particular slide based on the time of day.


[jQuery] jquery carousel with blockUI

2009-10-01 Thread Pedro Bras

I have a page with one item and when i click in the item i simple open
a detail page in a block ui of that item!

But now i want to show also in the block ui one carousel with a list
of items and whe it clicked one of that items should change the text
of the blockui.

There is any idea how i can do that can anybody help me?

Thank's in advance


[jQuery] Re: Trying to match just the first descendent in each tree of descendents

2009-10-01 Thread Karl Swedberg
Actually, it looks a little more complicated than that. Since the OP  
isn't using classes, .widget isn't going to work.


Andrew, I'm a little surprised your initial selector -- $ 
('[widget]:not([widget] [widget])') -- is working correctly. I'd  
probably do it a little differently:


$('div[widget]').filter(function() {
  return !$(this).parents([widget]).length;
})
// then you can loop through each of those top-level widgets
// and find their direct-child widgets...
.each(function(index) {
  $(this).children('[widget]') // and do something with them here
});

If you want to do something en-masse to all child widgets of top-level  
widgets, you don't need the .each():


$('div[widget]').filter(function() {
  return !$(this).parents([widget]).length;
}).children('[widget') // and do something with them here

I added 'div' to the initial selector, since it looks like all of your  
top-level widgets are divs. It's going to be quite a bit faster if you  
limit the selector to a specific tag name rather than inspecting every  
single element for a particular attribute.


Let me know if this doesn't work or if I misunderstood what you wanted.

--Karl


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




On Sep 30, 2009, at 11:57 PM, Charlie wrote:


$(.widget  .widget)  // stops at first desendant

$(.widget .widget : first) //might work too, haven't tried it

Andrew Ingram wrote:


Apologies for the subject line, I'm struggling to explain the problem
in a concise manner.

I have the following document:

body
h1 class=page-editable widget=linePage Title Goes 
Here/h1

div widget=repeat-area
div widget=repeat
h2 widget=lineSection Heading/h2

div widget=repeat-area

div widget=repeat
h3 widget=lineSection 
Title/h3
p 
widget=textareaContenthellip;/p
img src=test.png widget=image 
/
/div

div widget=repeat
h3 widget=lineSection 
Title/h3
p 
widget=textareaContenthellip;/p
img src=test.png widget=image 
/
/div
/div

/div
/div


/body

I am trying to recursively access each element with the attribute
'widget'. The first level of recursion is easy:

$('[widget]:not([widget] [widget])')

Which matches all widgets that are not descendants of other widgets,
ie the top level.

The problem is with the next recursive steps, I can't figure out how
to find just the first level of widgets that are a descendents of the
current node.

$('[widget]:not([widget] [widget])').each(function(i){

   // For example, I need a query I'd put here to access the next
level of elements.

});

There is no guarantee that the widgets would be direct children of
each other, or that they'd be on the same tree level as their
'sibling' widgets.

Basically I need a way of finding all widgets that are descendents of
the current working node, but with no other widgets in-between.

If anything needs clarifying let me know.

Regards,
Andrew Ingram








[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Julien

On 1 oct, 16:26, Charlie charlie...@gmail.com wrote:
 you are trying to apply css to something that isn;t in  the DOM.  $.css() 
 uses inline style attribute so if there is no html inline the attribute can't 
 be applied
 can you add class name to html server side and use css to pad?
 if not you could add class to exisitng td's before insertion of new html, 
 insert your AJAX, then do something like
 $(td).not('existTDClass').css(.

Thanks Charlie.
The answer you're giving me is what i was actually going to do.
But i'm surprised that you can't do something like that straight with
jquery.

The functions find() and filter() seems to work on html returned by
jquery ajax.
It seems very close to what i need.

So there is no other way at all?


[jQuery] Re: Superfish issues in ie6 and 7

2009-10-01 Thread Charlie





i've found if the li doesn't have a background it does what you are
describing in IE, try adding background even if it has to be a
transparent gif (gif vs png to avoid IE6 png issues)

i'm sure others may have solutions but has worked for me in past

neonwiredpixels wrote:

  In ie6 and 7 only i have issues with the menus closing while the mouse
is over them at certain points as if there is a gap in between the
list items. This makes using the menu impossible as they almost
immediately close. Gaps in vertical lists is a known issue with ie,
does anyone know is this is the cause and how to go about fixing this?

  






[jQuery] Selectors .each

2009-10-01 Thread Dave Maharaj :: WidePixels.com
I am trying to add a class to the first dl item each time it appears
inside set_list
 
$('.set_list').each(function(){
 $('dl.set:first').addClass('first');
 });
 
This appers to only add 'first' to the first dl and not each one in each
set_list
 
I have my code like below..i simply want to add 'first' to the first dl in
each set_list
 
set_list
dl = i want first added here
dt
dd
 
dl
dt
dd
 
set_list
dl = i want first added here
dt
dd
 
dl
dt
dd
 
Know where i went wrong?
 
Dave 


[jQuery] Re: Underline links of dynamic HTML introduced in the DOM

2009-10-01 Thread Jonathan Vanherpe (T T NV)


well, if you don't underline your links, you only really needed to 
define text-decoration: none once in your css. If you add 
.underlinelinks before whatever the selector you used for that, it will 
be overridden in most cases.


so your css would be something like:

#content a  {
text-decoration: none;  
}

.underlinelinks #content a  {
text-decoration: underline; 
}

if you really want to force it, you can use text-decoration: underline 
!important; , but note that internet explorer 6 doesn't know about 
!important.


Jonathan

SmiThiCo wrote:


Thanks. I'll give it a try.
I didn't tried this before because in the inner divs of the body I
sometimes override the text decoration value.
So in terms of css priority I not sure if this is going to work. But
I'll tell you later.

Thanks!

On Oct 1, 1:11 pm, Jonathan Vanherpe (T  T NV)jonat...@tnt.be
wrote:

SmiThiCo wrote:


Hi all,
Till now I din not found and an clean solution for my problem.



I have a button in my web site underline links that changes all the
links and affects its text decoration to 'underline'. From this point
all the links of the website should be underline. The problem is that
I can only make it work for the current DOM. If I introduce new links
into the DOM I need to select them specifically to change its text
decoration. Is there something similar to the live function in
jquery? For instance for every links introduced in the DOM I want to
check if the website is in underline mode. Case its true, the text
decoration will be changed!



Thanks in advance!



SmiThiCo


I obviously meant:

.underlinelinks a   {
 text-decoration: underline;
 }

--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be





--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] Re: Form Validation

2009-10-01 Thread Samuurai

I have just realised that you were the coder behind this -

My apologies..I didn't realise the flexibility of errorPlacement.

I got it working to a certain degree.. here's my code:

,errorPlacement: function(error,element){

$('[for='+element.attr(name)+']').parents('.grid-26')

.prepend('p'+error.text()+'/p')

.wrapInner('div class=error/div');

}

It applies the error and displays the message, but it infinitely
applies the error, placing more and more divs around it. when I click
on the input area and off it again. Also, how do I make it remove the
errors?

I thought it was using the success: method and using this code:
var error = label.parents('.error');
error.siblings().remove();
error.replaceWith(error.children());

But it didn't work basically I don't really know what I'm doing :)


On Oct 1, 11:24 am, Samuurai djbe...@gmail.com wrote:
 Thanks Jorn I'm looking at that, however I think I've devised another
 method.

 I need this code to be run on each offending field:

         $('[for=name]').parents('.grid-26') // for=name is the selctor for
 the label.
                 .prepend('pPlease write your real name/p')
                 .wrapInner('div class=error/div');

 });

 I only really have a background in PHP, so in PHP terms, how do I do
 a    foreach ($errors as $error) and then call the above code with the
 selector and the error message?

 Thanks!

 Beren

 On Oct 1, 9:01 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
 wrote:

  Take a look at the errorPlacement option, documented 
  here:http://docs.jquery.com/Plugins/Validation/validate#toptions

  Jörn

  On Thu, Oct 1, 2009 at 12:53 AM, Samuurai djbe...@gmail.com wrote:

   Hi,

   I have got some very rudimentary validation working with JQuery
   validation, however, by default, it creates some label tags with the
   error messages in them, right next to the input tags which have
   errors.

   How can I control where these error messages are displayed, as they're
   inside the same div as the input tag which is causing display issues.

   I'm very new to JQuery so please elaborate a little bit if you can.

   Thanks!

   B


[jQuery] jQuery is not a function

2009-10-01 Thread Eirtaza Rizvi

i am getting this error while i am using a plug in on word press.

please tell me if you know any possible solution!!

Regards,

EjjA


[jQuery] Re: Form Validation

2009-10-01 Thread Jörn Zaefferer

Take a look at some of the demos, eg. the Remember The Milk demo:
http://jquery.bassistance.de/validate/demo/milk/

You can customize the error further with the errorElement and
errorClass options. The resulting element needs to have a
for-attribute pointing to the associated input, otherwise the plugin
can't update it later on.

Jörn

On Thu, Oct 1, 2009 at 5:27 PM, Samuurai djbe...@gmail.com wrote:

 I have just realised that you were the coder behind this -

 My apologies..I didn't realise the flexibility of errorPlacement.

 I got it working to a certain degree.. here's my code:

                ,errorPlacement: function(error,element){

                        $('[for='+element.attr(name)+']').parents('.grid-26')

                        .prepend('p'+error.text()+'/p')

                        .wrapInner('div class=error/div');

                }

 It applies the error and displays the message, but it infinitely
 applies the error, placing more and more divs around it. when I click
 on the input area and off it again. Also, how do I make it remove the
 errors?

 I thought it was using the success: method and using this code:
 var error = label.parents('.error');
 error.siblings().remove();
 error.replaceWith(error.children());

 But it didn't work basically I don't really know what I'm doing :)


 On Oct 1, 11:24 am, Samuurai djbe...@gmail.com wrote:
 Thanks Jorn I'm looking at that, however I think I've devised another
 method.

 I need this code to be run on each offending field:

         $('[for=name]').parents('.grid-26') // for=name is the selctor for
 the label.
                 .prepend('pPlease write your real name/p')
                 .wrapInner('div class=error/div');

 });

 I only really have a background in PHP, so in PHP terms, how do I do
 a    foreach ($errors as $error) and then call the above code with the
 selector and the error message?

 Thanks!

 Beren

 On Oct 1, 9:01 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
 wrote:

  Take a look at the errorPlacement option, documented 
  here:http://docs.jquery.com/Plugins/Validation/validate#toptions

  Jörn

  On Thu, Oct 1, 2009 at 12:53 AM, Samuurai djbe...@gmail.com wrote:

   Hi,

   I have got some very rudimentary validation working with JQuery
   validation, however, by default, it creates some label tags with the
   error messages in them, right next to the input tags which have
   errors.

   How can I control where these error messages are displayed, as they're
   inside the same div as the input tag which is causing display issues.

   I'm very new to JQuery so please elaborate a little bit if you can.

   Thanks!

   B


[jQuery] (autocomplete) - possible bug

2009-10-01 Thread Machi

Hi people, first off thanks for the terrific job done with the
autocomplete pluggin.
However I think I found a bug:
I have an input text box with enabled autocomplete defined as follows:

$('#hostsTextBox').autocomplete(jsonHostsArray,
{
autoFill : true,
multiple : true,
mustMatch : true
});

Lest assume the following jsonHostsArray variable as follows:

jsonHostsArray = ['Windows', 'Linux', 'Mac'];

So, when I type w something, it brings Windows suggestion. Fine. Now
I set the cursor to the begging of the field and type L. The letter
makes is to the text box, the cursor automatically goes to the end of
the box and suggestion shows Linux (which I choose by hitting the
Enter key).
The result is: LWindows, Linux, which does not comply with the
mustMatch option..
I guess when I typed L in the wrong position, the control missed to
delete this incorrectly possitioned character besides from moving the
cursor to the right place.
Am I right?

Thanks in advance!


[jQuery] Form Validation errorplacement

2009-10-01 Thread slimshady

please read

http://codepad.org/MBcrgq7U


[jQuery] (autocomplete) - avoidRepeated option?

2009-10-01 Thread Machi

Hi!
I wondered if there were any plans to add another option, as stated in
the subject avoidRepeated which would work when option multiple is
set to true.

The thing is now I can choose a same element multiple times, which
makes no sense according to my business logic. I've been trying to
imagine where having the same item selected multiple times could be
useful, but still can think of a good answer, so I guess this could be
of interest to some other people as well.

Cheers,
Machi


[jQuery] Re: Can't load a page from a loaded page.

2009-10-01 Thread smwithdm

Chrazy,

Thank you for your great info!

I changed it as you said but didn't work.
I so looked at the api reference and did some homework and changed it
to the following and worked all fine!
I just had to change all load() to live()s.

Once again, thank you and thank you to JQuery!

- index.html - only changed places.

script type=text/javascript
$(document).ready(function(){
$(#mainview).load(page01.html);
$(#clickme).live(click, function(){
$(#mainview).load(page02.html);
});
$(#clickme2).live(click, function(){
$(#mainview).load(page03.html);
});
$(#clickme3).live(click, function(){
$(#mainview).load(page04.html);
});
});
/script

- END of index.html changed places. -

On 10月1日, 午前8:02, Chrazy cwolg...@gmail.com wrote:
 You have to use the live() event.

 So instead of:
   $(#clickme2).click(function(){
                  $(#mainview).load(page03.html);
          });

 You write:

  $(#clickme2).live('click', function(){
                  $(#mainview).load(page03.html);
          });

 Functions will just work with objects already in the DOM unless you
 bind them with live.

 On 1 Okt, 07:45, smwithdm smwit...@gmail.com wrote:



  I'm trying toloadapageusing the .load(url) from an alreadyloaded
 page, but nothing responds. Below is a simple samplepagecreated to
  show what I want to accomplish.
  Also, I'm using JQuery 1.3.

  - index.html -
  html
  head
  script type=text/javascript src=jquery.js/script
  script type=text/javascript
  $(document).ready(function() {
          $(#mainview).load(page01.html);
          $(#clickme).click(function(){
                  $(#mainview).load(page02.html);
          });
          $(#clickme2).click(function(){
                  $(#mainview).load(page03.html);
          });
          $(#clickme3).click(function(){
                  $(#mainview).load(page04.html);
          });});

  /script
  /head
  body
  div id=mainview/div
  /body
  /html

  - END of index.html -

  - page01.html -

  htmlhead/headbody
  pThis is page01.html/p
  div id=clickmeClick Me!/div
  psome stuffs/p
  /body
  /html

  - END of page01.html -

  - page02.html -

  htmlhead/headbody
  pThis is page02.html/p
  div id=clickme2Click Me!/div
  psome more stuffs again/p
  /body
  /html

  - END of page02.html -

  - page03.html -

  htmlhead/headbody
  pThis is page03.html/p
  div id=clickme3Click Me!/div
  psome more stuffs again/p
  /body
  /html

  - END of page03.html -

  When the index.htmlpageloads up, the page01.html loads into
  #mainview.
  And when I try to click on the div id=clickmeClick Me!/div
  inside page01.html toloadpage02.html, nothing works.

  Just can't figure out what's wrong... If someone knows an easy trick,
  please help me out. Thank You!


[jQuery] Re: jQuery is not a function

2009-10-01 Thread MorningZ

The cause for the problem is easy:  you do not have the correct path
to the jQuery file



On Oct 1, 10:50 am, Eirtaza Rizvi eirtaza...@gmail.com wrote:
 i am getting this error while i am using a plug in on word press.

 please tell me if you know any possible solution!!

 Regards,

 EjjA


[jQuery] Re: Can't load a page from a loaded page.

2009-10-01 Thread smwithdm

Sorry, I meant click()s to live().


On 10月1日, 午前10:49, smwithdm smwit...@gmail.com wrote:
 Chrazy,

 Thank you for your great info!

 I changed it as you said but didn't work.
 I so looked at the api reference and did some homework and changed it
 to the following and worked all fine!
 I just had to change allload() to live()s.

 Once again, thank you and thank you to JQuery!

 - index.html - only changed places.

 script type=text/javascript
 $(document).ready(function(){
         $(#mainview).load(page01.html);
         $(#clickme).live(click, function(){
                 $(#mainview).load(page02.html);
         });
         $(#clickme2).live(click, function(){
                 $(#mainview).load(page03.html);
         });
         $(#clickme3).live(click, function(){
                 $(#mainview).load(page04.html);
         });});

 /script

 - END of index.html changed places. -

 On 10月1日, 午前8:02, Chrazy cwolg...@gmail.com wrote:



  You have to use the live() event.

  So instead of:
    $(#clickme2).click(function(){
                   $(#mainview).load(page03.html);
           });

  You write:

   $(#clickme2).live('click', function(){
                   $(#mainview).load(page03.html);
           });

  Functions will just work with objects already in the DOM unless you
  bind them with live.

  On 1 Okt, 07:45, smwithdm smwit...@gmail.com wrote:

   I'm trying toloadapageusing the .load(url) from an alreadyloaded
  page, but nothing responds. Below is a simple samplepagecreated to
   show what I want to accomplish.
   Also, I'm using JQuery 1.3.

   - index.html -
   html
   head
   script type=text/javascript src=jquery.js/script
   script type=text/javascript
   $(document).ready(function() {
           $(#mainview).load(page01.html);
           $(#clickme).click(function(){
                   $(#mainview).load(page02.html);
           });
           $(#clickme2).click(function(){
                   $(#mainview).load(page03.html);
           });
           $(#clickme3).click(function(){
                   $(#mainview).load(page04.html);
           });});

   /script
   /head
   body
   div id=mainview/div
   /body
   /html

   - END of index.html -

   - page01.html -

   htmlhead/headbody
   pThis is page01.html/p
   div id=clickmeClick Me!/div
   psome stuffs/p
   /body
   /html

   - END of page01.html -

   - page02.html -

   htmlhead/headbody
   pThis is page02.html/p
   div id=clickme2Click Me!/div
   psome more stuffs again/p
   /body
   /html

   - END of page02.html -

   - page03.html -

   htmlhead/headbody
   pThis is page03.html/p
   div id=clickme3Click Me!/div
   psome more stuffs again/p
   /body
   /html

   - END of page03.html -

   When the index.htmlpageloads up, the page01.html loads into
   #mainview.
   And when I try to click on the div id=clickmeClick Me!/div
   inside page01.html toloadpage02.html, nothing works.

   Just can't figure out what's wrong... If someone knows an easy trick,
   please help me out. Thank You!


[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Charlie





if it was json or xml could parse it then append, I've never tried
parsing html from ajax

another method is append to an empty hidden table, add classes/css or
whatever to the td's in that table then append them to your visible
table

Julien wrote:

  On 1 oct, 16:26, Charlie charlie...@gmail.com wrote:
  
  
you are trying to apply css to something that isn;t in the DOM. $.css() uses inline style attribute so if there is no html inline the attribute can't be applied
can you add class name to html server side and use css to pad?
if not you could add class to exisitng td's before insertion of new html, insert your AJAX, then do something like
$("td").not('existTDClass').css(.

  
  
Thanks Charlie.
The answer you're giving me is what i was actually going to do.
But i'm surprised that you can't do something like that straight with
jquery.

The functions find() and filter() seems to work on html returned by
jquery ajax.
It seems very close to what i need.

So there is no other way at all?

  






[jQuery] Re: parentNode is null or not an object

2009-10-01 Thread Hugo Estrada
I figured out what the problem was. In fact, there were two problems:

1. The parentNode problem is triggered by having html tags not closed
properly. (The error makes sense)
2. The second error that I was getting, having to do with text-style, was
that the value that it was being given, bold, is incorrect for this style
property.

Hugo

On Wed, Sep 30, 2009 at 8:32 AM, Hugo Estrada hugoe...@gmail.com wrote:


 I am getting this error on IE8; it is working nice on firefox, and I
 have to support IE.

 I found this page:

 http://www.nabble.com/Error-with-BlockUI:-%27parentNode%27-is-null-or-not-an-object-td22990094s27240.html

 And they identify as the problem occurring here:

 The error occurs in the 'install' function right here:

 quote from link
 var node = msg.jquery ? msg[0] : msg;
var data = {};
$(el).data('blockUI.history', data);
data.el = node;
data.parent = node.parentNode; --- ERROR OCCURS HERE
 /quote from link

 Where it talks the problem, and I believe I have run into the same
 error. The problem is that I can't figure out what I am supposed to do
 to fix it :)

 Any pointers on how to fix this so that blockUI can work nicely with
 IE?



[jQuery] Re: Form Validation

2009-10-01 Thread Samuurai

I didn't realise it needed the 'for' attribute. I just finished
updating my CSS to allow me to use the default label, so that's one
less step I need now.

I've just found a useful jquery plugin called unwrap.. hopefully it
makes removing the wrapping div easier.

Thanks Jorn

B

On Oct 1, 4:44 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Take a look at some of the demos, eg. the Remember The Milk 
 demo:http://jquery.bassistance.de/validate/demo/milk/

 You can customize the error further with the errorElement and
 errorClass options. The resulting element needs to have a
 for-attribute pointing to the associated input, otherwise the plugin
 can't update it later on.

 Jörn

 On Thu, Oct 1, 2009 at 5:27 PM, Samuurai djbe...@gmail.com wrote:

  I have just realised that you were the coder behind this -

  My apologies..I didn't realise the flexibility of errorPlacement.

  I got it working to a certain degree.. here's my code:

                 ,errorPlacement: function(error,element){

                         
  $('[for='+element.attr(name)+']').parents('.grid-26')

                         .prepend('p'+error.text()+'/p')

                         .wrapInner('div class=error/div');

                 }

  It applies the error and displays the message, but it infinitely
  applies the error, placing more and more divs around it. when I click
  on the input area and off it again. Also, how do I make it remove the
  errors?

  I thought it was using the success: method and using this code:
  var error = label.parents('.error');
  error.siblings().remove();
  error.replaceWith(error.children());

  But it didn't work basically I don't really know what I'm doing :)

  On Oct 1, 11:24 am, Samuurai djbe...@gmail.com wrote:
  Thanks Jorn I'm looking at that, however I think I've devised another
  method.

  I need this code to be run on each offending field:

          $('[for=name]').parents('.grid-26') // for=name is the selctor for
  the label.
                  .prepend('pPlease write your real name/p')
                  .wrapInner('div class=error/div');

  });

  I only really have a background in PHP, so in PHP terms, how do I do
  a    foreach ($errors as $error) and then call the above code with the
  selector and the error message?

  Thanks!

  Beren

  On Oct 1, 9:01 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
  wrote:

   Take a look at the errorPlacement option, documented 
   here:http://docs.jquery.com/Plugins/Validation/validate#toptions

   Jörn

   On Thu, Oct 1, 2009 at 12:53 AM, Samuurai djbe...@gmail.com wrote:

Hi,

I have got some very rudimentary validation working with JQuery
validation, however, by default, it creates some label tags with the
error messages in them, right next to the input tags which have
errors.

How can I control where these error messages are displayed, as they're
inside the same div as the input tag which is causing display issues.

I'm very new to JQuery so please elaborate a little bit if you can.

Thanks!

B


[jQuery] Randomly change thumbs ?

2009-10-01 Thread dichterDichter

Hi pros.

is there a way to manipulate thumbnails on a page..
for example to place 6 thumbs there ( 12 thumbs are in gallery )
and change them randomly ?

im seaching for a solution or quite a while but cant find anything.


Greetings


[jQuery] How to disable text inputs lying near checkboxes ?

2009-10-01 Thread Julien

Hi,

One of my HTML forms uses pairs of checkbox/text inputs.
Each checkbox is printed on the left of the text input, but is written
before that field as it must be justified on the right (float:right).

li
input name=footer_company type=text style=float:right; /
input name=footer_company_checkbox type=checkbox
checked=checkedCompany name :/input
/li

I would like to disable each text input for which the corresponding
checkbox doesn't have the checked status.

I could retrieve the checkboxes that are preceded by a text field and
find which ones are in unselected mode.
But I was then unable find for each unchecked checkbox the preceding
text field so that I can disable it.

The .disabled=true also does not disable any text field.

$(':text~:checkbox').each(
  function(){
if(!this.checked) {
  $(':text').css('background-color','yellow'); // This works but
selects all text inputs.
  $(':text').disabled=true; // This does not work.
}
  }
);

Thanks for any help.

Julien


[jQuery] Re: Tablesorter problems [Solved]

2009-10-01 Thread Mike

Jon,

You are right! Thanks. I saw those characters and thought were have
they come from as in my code it is just white space.

Many Thanks

On Oct 1, 1:57 pm, Jon Banner banali...@googlemail.com wrote:
 Hi Mike,
 it looks as if you have copied and pasted some illegal characters in to your
 demo page.
 Try removing these and see if that helps.

 Best,
 Jon

 2009/10/1 Mike michael.dimm...@virgin.net





  Is there no one that can help?

  On Sep 30, 4:26 pm, Mike michael.dimm...@virgin.net wrote:
   Hi I have recently come across the tablesorter 2.0 for jquery and have
   decided to use it on my website.  I have the examples to work etc.
   however I would like to exclude the first column of my table from
   being sorted and just to remain static irrespect of the other columns
   being sortable.

   I have found this :
 http://stackoverflow.com/questions/437290/exclude-a-column-from-being...
   which is exactly what I needed however when pasting it into my test
   web page I get line 16 parse error (missing before statement).

   I have no previous experience of knowledge of jQuery so I would
   appreciate if someone could look at my test page and see what the
   problem is:
 http://www.freebetsextra.co.uk/tablesorter/tests/freebet3.html.

   This is the widget I am trying to use:

   $(function() {
       // add new widget called indexFirstColumn
       $.tablesorter.addWidget({
           // give the widget a id
           id: indexFirstColumn,
           // format is called when the on init and when a sorting has
   finished
           format: function(table) {
                   // loop all tr elements and set the value for the
   first column
                   for(var i=0; i  table.tBodies[0].rows.length; i++) {
                           $(tbody tr:eq( + (i - 1) + )
   td:first,table).html(i);
                   }
           }
       });

       $(table).tablesorter({
           widgets: ['zebra','indexFirstColumn']
       });

   });


[jQuery] Re: remove accordion item

2009-10-01 Thread Hundredth Monkey

no :O( this removes the items. but the accordion does not render
correct ...

On 1 Okt., 03:45, plian plia...@gmail.com wrote:
 hi, hope the following code could help

 div id=accordion
         div id=content1h3a href=#header/a/h3
                 divcontent
                         a href=javascript:void(0); onclick=$(this).parents
 ('#content1').fadeOut('slow').remove();Delete/a
                 /div
         /div
         div id=content2h3 a href=#header2/a/h3
                 divcontent 2
                         a href=javascript:void(0); onclick=$(this).parents
 ('#content2').fadeOut('slow').remove();Delete/a
                 /div
         /div
 /div

 On Oct 1, 12:47 am, Hundredth Monkey stephan.a...@googlemail.com
 wrote:

  thanx for your response .
  but this doesnt work. there simply happens nothing .
  this is my HTML markup.

  div id=accordion
          h3a href=#header/a/h3
          divcontent
                  a href=javascript:void(0); onclick=$(this).parents
  ('div.accordion').fadeOut('slow').remove();Delete/a
          /div
          h3a href=#header2/a/h3
          divcontent 2
                  a href=javascript:void(0); onclick=$(this).parents
  ('div.accordion').fadeOut('slow').remove();Delete/a
          /div
  /div

  any idea what I' m doing wrong?

  I ve also tried to put IDs in the h3 and div elements to remove them
  via $.remove(), but this destroys all other accordion items too :O(

  On 30 Sep., 18:18, Liam Potter radioactiv...@gmail.com wrote:

   $(this).parents(div.accordion).fadeOut('slow').remove();

   where div.accordion is what you're trying to remove.

   Hundredth Monkey wrote:
hi,
i want to realize a delete button or link within an accordion item. is
it possible to remove a special item or make the header disabled after
a link click within the accordion item content?
so far i' ve tried $(this).parent().fadeOut('slow');
but this kills all item contents :O(
best regards.


[jQuery] Re: Is it possible to use jQuery BlockUI inside a User Control in .NET ?

2009-10-01 Thread MorningZ

To answer your question on a high level overview:  of course it's
possible to use the plugin with/inside a user control.  all your
ASP.NET code is doing, and this is whether it's a stand alone ASPX
page, one with MasterPages, and/or using User Controls, at the end of
the page generation you are creating HTML and sending to the client
browser, at what point the JavaScript/jQuery comes into play

So figure out what you are generating, where you want to block, and
wire in your code to .block and .unblock accordingly, and it
doesn't take clicks or iframes to make the plugin do it's thing

On Oct 1, 10:04 am, Renan renanrs2...@gmail.com wrote:
 Hello buddys

 I am a ASP.NET developer and I would like to use the jQuery BlockUI
 inside a generic control, designed to show a popup (with javascript
 and CSS effects). My problem is to disable (key tab, enter and mouse
 clicks) the parent window (parent element) (my control is inside the
 page and does not use iframe).

 Inside my control I have a DIV and I show his content when the user
 call the method designed.

 The problem is: I only see the caller of BlockUI using this type of
 eventhandler CLICK, ex:

         $('#pageDemo2').click(function() {
             $.blockUI({ message: 'h1img src=busy.gif / Just a
 moment.../h1' });
             test();
         });

 It is possible apply that property inside the blockUI out of my DIV
 (parent element), inside my control, without click ? Is it necessary
 to use a iframe?

 I try other ways and do not work for me

 Regards,


[jQuery] how to replace all the '[]' to be '' in $.SortSerialize('MDEExportedList').hash

2009-10-01 Thread Junhua Gao
 I use $.SortSerialize('MDEExportedList').hash.replace('[]','')
  but only the first one is replaced.
  Who can help me?


[jQuery] how to replace all the '[]' to be '' in $.SortSerialize('MDEExportedList').hash

2009-10-01 Thread Junhua Gao
 I use $.SortSerialize('MDEExportedList').hash.replace('[]','')
  but only the first one is replaced.
  Who can help me?


[jQuery] Re: how to replace all the '[]' to be '' in $.SortSerialize('MDEExportedList').hash

2009-10-01 Thread waseem sabjee
why not just try str.replace() ?

On Thu, Oct 1, 2009 at 7:18 PM, Junhua Gao gaojun...@gmail.com wrote:

  I use $.SortSerialize('MDEExportedList').hash.replace('[]','')
   but only the first one is replaced.
   Who can help me?



[jQuery] Re: Selectors .each

2009-10-01 Thread Michael Geary
When you write $('dl.set:first') you are saying, make a list of all DL
elements in the document that have the 'set' class, and give me the first
element in that list.

Putting this code inside the .each() loop doesn't change that. The
$('dl.set:first') selector stands on its own.

The code you want is:

$('.set_list').each( function() {
$(this).find('dl.set:first').addClass('first');
});

By writing $(this).find('dl.set:first') you are saying, Start with 'this',
which is the '.set_list' element for this particular iteration of the
.each() loop. Now find the DL elements with the 'set' class *inside* this
'.set_list'. Give me the first of those elements.

I'm assuming that the .set_list element actually is the parent of those
DL/DT/DD elements.

-Mike

On Thu, Oct 1, 2009 at 8:19 AM, Dave Maharaj :: WidePixels.com 
d...@widepixels.com wrote:

  I am trying to add a class to the first dl item each time it appears
 inside set_list

 $('.set_list').each(function(){
  $('dl.set:first').addClass('first');
  });

 This appers to only add 'first' to the first dl and not each one in each
 set_list

 I have my code like below..i simply want to add 'first' to the first dl in
 each set_list

 set_list
 dl = i want first added here
 dt
 dd

  dl
 dt
 dd

  set_list
 dl = i want first added here
 dt
 dd

  dl
 dt
 dd

 Know where i went wrong?

 Dave



[jQuery] Re: Selectors .each

2009-10-01 Thread Karl Swedberg

Hi Dave,
There are a few ways to do this. Probably the easiest is with :first- 
child.


$('.set_list  dl.set:first-child').addClass('first');

That will add the class to all dl class=set elements if they are a  
child of .set_list and if they are the first child of their parent.



--Karl


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




On Oct 1, 2009, at 11:19 AM, Dave Maharaj :: WidePixels.com wrote:

I am trying to add a class to the first dl item each time it  
appears inside set_list


$('.set_list').each(function(){
 $('dl.set:first').addClass('first');
 });

This appers to only add 'first' to the first dl and not each one in  
each set_list


I have my code like below..i simply want to add 'first' to the first  
dl in each set_list


set_list
dl = i want first added here
dt
dd

dl
dt
dd

set_list
dl = i want first added here
dt
dd

dl
dt
dd

Know where i went wrong?

Dave




[jQuery] Re: Selectors .each

2009-10-01 Thread Dave Maharaj :: WidePixels.com

Right on. Thanks for pointing that out and clearing it up for me.

I'm assuming that the .set_list element actually is the parent of those
DL/DT/DD elements. you are correct.

Thanks again

Dave

 

-Original Message-
From: Michael Geary [mailto:m...@mg.to] 
Sent: October-01-09 3:03 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Selectors .each

When you write $('dl.set:first') you are saying, make a list of all DL
elements in the document that have the 'set' class, and give me the first
element in that list.

Putting this code inside the .each() loop doesn't change that. The
$('dl.set:first') selector stands on its own.

The code you want is:


$('.set_list').each( function() {
$(this).find('dl.set:first').addClass('first');
});

By writing $(this).find('dl.set:first') you are saying, Start with 'this',
which is the '.set_list' element for this particular iteration of the
.each() loop. Now find the DL elements with the 'set' class *inside* this
'.set_list'. Give me the first of those elements.

I'm assuming that the .set_list element actually is the parent of those
DL/DT/DD elements.

-Mike


On Thu, Oct 1, 2009 at 8:19 AM, Dave Maharaj :: WidePixels.com
d...@widepixels.com wrote:


I am trying to add a class to the first dl item each time it
appears inside set_list
 
$('.set_list').each(function(){
 $('dl.set:first').addClass('first');
 });
 
This appers to only add 'first' to the first dl and not each one in
each set_list
 
I have my code like below..i simply want to add 'first' to the first
dl in each set_list
 
set_list
dl = i want first added here
dt
dd
 

dl
dt
dd
 

set_list
dl = i want first added here
dt
dd
 

dl
dt
dd
 
Know where i went wrong?
 

Dave 





[jQuery] Re: How to disable text inputs lying near checkboxes ?

2009-10-01 Thread Karl Swedberg
Inside your .each() you need to select the text input in relation to  
the matched checkbox. Also, you can't set a DOM property value on a  
jQuery object.


This should work:

$(':text~:checkbox').each(
 function(){
   if(!this.checked) {
 $(this).prev()
.css('background-color','yellow')
[0].disabled = true;
   }
 }
);

You could also replace [0].disabled = true with .attr('disabled', true)

--Karl


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




On Oct 1, 2009, at 11:31 AM, Julien wrote:



Hi,

One of my HTML forms uses pairs of checkbox/text inputs.
Each checkbox is printed on the left of the text input, but is written
before that field as it must be justified on the right (float:right).

li
input name=footer_company type=text style=float:right; /
input name=footer_company_checkbox type=checkbox
checked=checkedCompany name :/input
/li

I would like to disable each text input for which the corresponding
checkbox doesn't have the checked status.

I could retrieve the checkboxes that are preceded by a text field and
find which ones are in unselected mode.
But I was then unable find for each unchecked checkbox the preceding
text field so that I can disable it.

The .disabled=true also does not disable any text field.

$(':text~:checkbox').each(
 function(){
   if(!this.checked) {
 $(':text').css('background-color','yellow'); // This works but
selects all text inputs.
 $(':text').disabled=true; // This does not work.
   }
 }
);

Thanks for any help.

Julien




[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Julien

On 1 oct, 17:52, Charlie charlie...@gmail.com wrote:
 if it was json or xml could parse it then append, I've never tried parsing 
 html from ajax
 another  method is append  to an empty hidden table, add classes/css or 
 whatever to the td's in that table then append them to your visible table

hum... i'm still thinking there must be much more to it. See the
following example :

$('a').live('click',function(e){
$.ajax({
  url: testAjax.html,
  cache: false,
  success: function(data){
htmlOutput = $('.fileName',data).css('padding-left','80px');
htmlOutput.appendTo(#treeTable);
  }
});
e.preventDefault();
  })

By specifying as DOM context the returned html, i'm able to work on
it.
The only thing in this example i don't get is why htmlOutput return
only the td updated and not the surrounding tr.

Is it the way it work only? If it is, i could try parsing it as xml as
you said with the each function but i want to be sure i'm not missing
something! :)
Thanks for the help!


[jQuery] Re: compare variables

2009-10-01 Thread Michael Geary
Regular expressions are a good friend indeed, but in this particular case
they would let you down.

You could do something like:

var re = new RegExp( '^' + varA );
if( re.test(varB) )
alert( 'prefix matches' );

But what if varA contains special characters that are significant in a
regular expression, such as ? or $ or the like? Then it wouldn't do what you
want.

Instead, I would use indexOf:

if( varB.indexOf(varA) == 0 )
alert( 'prefix matches' );

BTW, Poloman, if you're wondering why you couldn't find anything in jQuery
to help with this, that's because jQuery is not a string or regular
expression library. jQuery deals primarily with the DOM and not much else.

Strings, regular expression, math functions, and so forth are all part of
JavaScript itself, so that's where you'd look for solutions.

(Don't get me wrong, no one minds having you ask here - it's just that this
kind of code isn't part of jQuery, so you won't find anything in the jQuery
docs about it.)

-Mike

On Thu, Oct 1, 2009 at 4:35 AM, Jon Banner banali...@googlemail.com wrote:

 make friends with regular expressions.
 http://en.wikipedia.org/wiki/Regular_expression


 2009/9/30 Poloman bigtrouble1...@gmail.com


 I have

 varA = com and varB=com55 or ton2 or son1.9 or whatever values...

 I want to do a comparison if the prefix of varB = com, which is varA,
 then do something. How can i write the code for this ?





[jQuery] Re: How to manipulate an object containaing HTML

2009-10-01 Thread Karl Swedberg

Sure, you can do this with html.

Inside the success callback function, do this:

$(html)
  .find(td)
.css('padding-left','80px')
  .end()
   .appendTo('#myTable');


I agree with Charlie that it's a better idea to set the style with css  
and then just add a class to the td elements. Whether you do that  
server-side or in the success callback is up to you.


Also, you ought to append table rows to a tbody, not to a table.


--Karl


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




On Oct 1, 2009, at 11:52 AM, Charlie wrote:

if it was json or xml could parse it then append, I've never tried  
parsing html from ajax


another  method is append  to an empty hidden table, add classes/css  
or whatever to the td's in that table then append them to your  
visible table


Julien wrote:


On 1 oct, 16:26, Charlie charlie...@gmail.com wrote:

you are trying to apply css to something that isn;t in  the DOM.   
$.css() uses inline style attribute so if there is no html inline  
the attribute can't be applied

can you add class name to html server side and use css to pad?
if not you could add class to exisitng td's before insertion of  
new html, insert your AJAX, then do something like

$(td).not('existTDClass').css(.



Thanks Charlie.
The answer you're giving me is what i was actually going to do.
But i'm surprised that you can't do something like that straight with
jquery.

The functions find() and filter() seems to work on html returned by
jquery ajax.
It seems very close to what i need.

So there is no other way at all?








[jQuery] (autocomplete) help about extraparams

2009-10-01 Thread pragard

Hi, i'm trying the jquery autocomplete from here

http://docs.jquery.com/Plugins/Autocomplete

On that page someone said that:

Often one autocompleted field depends on the value of another field.
In that case, the extraParams option can provide the necessary dynamic
parameter:

Consider an example where the states-field reuses the value entered
into the country field


And the examples was:

$(#states).autocomplete(url, {
   extraParams: {
   country: function() { return $(#country).val(); }
   }


What I'm trying to do is I made a combo box that contain country with
it's id, and I also have a input text that will do the autocomplete.
If I select one of the country from the combo box, I want input text
will show me, when I press some words with autocomplete function, all
of the city that include in that country (assuming I have it in my
database).

What should I do? Can someone give me some examples?

Thanks.


[jQuery] Notre Dame Inspired Jquery -- Exists?

2009-10-01 Thread Kevin Jones

http://www.nd.edu/

Their homepage has a carousel-ish type of feature. Does anyone know if
this exists already with a jQuery plugin? I don't know if our project
has the allotted time for me to make one from scratch, so I was
curious if it existed or could be easily adapted from somewhere else.
If anyone has any insight, it would be very helpful. It doesn't need
video or anything inside, just the three rotating images on click,
coming in front of one another.

Thanks,
Kevin


[jQuery] Re: $.post cross domain first sends an OPTIONS verb?

2009-10-01 Thread Vitaly Piven

Hello David,

I have similar problem . $.post() sends some OPTIONS request instead
of expected POST (according to logs of web server).

On 25 сен, 21:32, David P dpio...@gmail.com wrote:
 I use $.post like so:

 $.post(http://mydomain.com/some/webservice;, $.toJSON({ emailAddress:
 emailAddress }), callback, json);

 this works great..the response of the POST is a json string and that
 is used in the callback..now I added https:

 $.post(https://mydomain.com/some/webservice;, $.toJSON
 ({ emailAddress: emailAddress }), callback, json);

 so it is now a cross domain post...in firebug I see that instead of
 POST'ing like in the http case..it first is sending an OPTIONS
 verb..why?  The webservice doesn't know how to respond to that and
 gives a 403 forbidden...I need it to just send the POST like it did
 when it was on the same domain...

 Any insight?


[jQuery] Re: Skipping a slide with Cycle Plugin

2009-10-01 Thread Mike Alsup

This isn't supported directly by the plugin.  The only thing I can
think of is using a dynamic timeout and setting it to 1 for that
slide.  I have a hunch it won't work terribly well though.

Mike

On Oct 1, 10:00 am, Garrison Locke gplo...@gmail.com wrote:
 Does anyone know how to disable a slide or skip one based on some
 dynamic piece of information?  For example, I want to skip a
 particular slide based on the time of day.


[jQuery] change backgroundposition to window width

2009-10-01 Thread Barisko

$(function(){

   var w = $(window).width();

  $('#background').css({backgroundPosition: w + 'px 190px'});

});


Could anyone explain to mee why this is not working...?


[jQuery] Re: ajax complete function not being called

2009-10-01 Thread mike

Right!  I'm having the same problem--neither the error nor the
complete are being called.  The request just fails, probably because
the responseText is not JSON.

I've had no luck searching around for answers to this either.  Guess
we'll have to wait until the jQuery JSONP plugin is more mature.
( ._.)

Mike

On Sep 28, 9:13 pm, Alex bretwal...@gmail.com wrote:
 I'm making a call to a Twitter JSON feed, and when I pass an incorrect
 username, jQuery's ajax complete method never gets called.

 An example of a JSON response that causes complete not to be called
 (nor error, nor success) 
 is:http://twitter.com/users/show.json?screen_name=bhdjbhubeuhfbfbjfbjf

 Here's my code:

 $.ajax({
         type: GET,
         url: http://twitter.com/users/show.json;,
         cache: false,
         data: screen_name= + $('#account-id').val().replace(/^\s*|\s*$/
 g,''),
         dataType: jsonp,
         async: true,
         success: function(j){
                 alert('success');
         },
         error: function(xhr, ajaxOptions, thrownError) {
                 alert(xhr + ' ' + ajaxOptions + ' ' + thrownError);
         },
         complete: function() {
                 alert('finished');
         }

 });

 Any ideas on why the complete method isn't getting called?

 Shouldn't this always get called?

 Thanks!


[jQuery] .ajax() with dataType: 'jsonp' will not use error callback if request fails

2009-10-01 Thread mrandall

I'm using an .ajax() call to do a jsonp request to another domain.
When the user is not logged in, however, the server will return a 401
error.  Unfortunately, this causes my .ajax() call to fail _without_
calling the error callback.  Is this a known bug?  Here is my code:

  $.ajax({
url:  appData.API.workout.get,
data: {date: App.formatDate(date)},
dataType: 'jsonp',
success:  function(json) {
  Data =  json;
  model.buildOrderedWorkout();
  myCP.Workout.View.initialize();
},
error:function(xOptions, error) {

  Controller.requestError(xOptions, error);
}
  });

Is there a way to get this request to not fail?  I also looked at the
jquery-jsonp plugin, but that didn't really work and did not return
the http status codes.

Thanks for your help,
Mike


[jQuery] Selecting Form Element Labels

2009-10-01 Thread rob

I'm using a form in several places for this project.  I don't want to
duplicates of this form so I have it as an include file.  Each page
requires all the same fields, however, there is one page where I'd
like to remove two fields.

fieldset
label for=FirstNameFirst Name/label
input id=FirstName /
/fieldset

Is there a way to remove an input field and it's label by selecting
the ID of the input field?

I looked at the JQuery doc, and there's a prev + next selector which
shows $('label + input').css ... this will set css properties for an
input element that follows a label element.

something like $('#FirstName  label + input').remove...


[jQuery] Troubles altering dropdown menu code..

2009-10-01 Thread scoob...@gmail.com

I was just wondering if somebody out there could answer a couple
questions about this menu I'm working on.. Im all out of ideas..

Here is a working sample: http://client.vdhinc.com/PB/menus/horizontal_menu/

I have 2 situations...

1) When you hover a main menu item that has a submenu, and then mouse
over the submenu items, and then move the mouse back up to that
dropdowns main link, the submenu slides back up.. I'm trying to make
it so the menu stays open when this happens.. Any ideas?

2) When hovering over a menu item that has a submenu, I've noticed
that I have a small gap (due to borders and positioning for style) in
between the main menu items and submenu items.. Is there any way to
remedy this other than removing borders or positioning the submenu up
higher?

Thanks to all that reply in advance!!


[jQuery] Re: ajax complete function not being called

2009-10-01 Thread mike

Right!  I'm having the same problem--neither the error nor the
complete are being called.  The request just fails, probably because
the responseText is not JSON.

I've had no luck searching around for answers to this either.  Guess
we'll have to wait until the jQuery JSONP plugin is more mature.
( ._.)

Mike

On Sep 28, 9:13 pm, Alex bretwal...@gmail.com wrote:
 I'm making a call to a Twitter JSON feed, and when I pass an incorrect
 username, jQuery's ajax complete method never gets called.

 An example of a JSON response that causes complete not to be called
 (nor error, nor success) 
 is:http://twitter.com/users/show.json?screen_name=bhdjbhubeuhfbfbjfbjf

 Here's my code:

 $.ajax({
         type: GET,
         url: http://twitter.com/users/show.json;,
         cache: false,
         data: screen_name= + $('#account-id').val().replace(/^\s*|\s*$/
 g,''),
         dataType: jsonp,
         async: true,
         success: function(j){
                 alert('success');
         },
         error: function(xhr, ajaxOptions, thrownError) {
                 alert(xhr + ' ' + ajaxOptions + ' ' + thrownError);
         },
         complete: function() {
                 alert('finished');
         }

 });

 Any ideas on why the complete method isn't getting called?

 Shouldn't this always get called?

 Thanks!


[jQuery] Downloading Jquery

2009-10-01 Thread tendai

Im creating a photo gallery that uses jquery. After downloading jquery
it wont let me run it. Anybody know whats up with that.


[jQuery] is(':checked') always returns false

2009-10-01 Thread bob.nel...@gmail.com

I have a bunch of checkboxes that I want to have checked when the user
checks a master checkbox. I've done this before and reused the working
code, but changed some DOM id's. The problem is its not working. I've
narrowed it down to is(':checked') as always returning false. Again,
I've reused working code from within the same site. The only thing
different are the id's. Here is my code:

HTML for master checkbox (within a container with id 'msgsInbox'):
input id=msgCheckAllInbox name=msgCheckboxAllInbox
type=checkbox value= onclick=checkAllMsgsIn() tabindex=-1 /


HTML for series of checkboxes:
input id=msg2531cb name=msgCheckbox[] class=messageCheckbox
type=checkbox value=2531 tabindex=-1 /
input id=msg2532cb name=msgCheckbox[] class=messageCheckbox
type=checkbox value=2532 tabindex=-1 /
ETC...


Javascript for master checkbox onclick function:
function checkAllMsgsIn() {
alert($('#msgCheckAllInbox').is(:checked));//Used to debug this
problem, will always returns false
$('#msgsInbox input.messageCheckbox').attr('checked', $
('#msgCheckAllInbox').is(':checked'));
//$('#msgsInbox input.messageCheckbox').attr('checked',
true);  //This will check all the boxes, so my jquery identifier is
correct.
}


I've search through my entire site to make sure there isn't another
element named 'msgCheckAllInbox'. There is not. So I'm stumped with
this one.

Any ideas? Thank you in advance for any help.




[jQuery] Re: is(':checked') always returns false

2009-10-01 Thread MorningZ

You've got issues elsewhere in your code that you don't show:

http://jsbin.com/ocode/edit



On Oct 1, 2:16 pm, bob.nel...@gmail.com bob.nel...@gmail.com
wrote:
 I have a bunch of checkboxes that I want to have checked when the user
 checks a master checkbox. I've done this before and reused the working
 code, but changed some DOM id's. The problem is its not working. I've
 narrowed it down to is(':checked') as always returning false. Again,
 I've reused working code from within the same site. The only thing
 different are the id's. Here is my code:

 HTML for master checkbox (within a container with id 'msgsInbox'):
 input id=msgCheckAllInbox name=msgCheckboxAllInbox
 type=checkbox value= onclick=checkAllMsgsIn() tabindex=-1 /

 HTML for series of checkboxes:
 input id=msg2531cb name=msgCheckbox[] class=messageCheckbox
 type=checkbox value=2531 tabindex=-1 /
 input id=msg2532cb name=msgCheckbox[] class=messageCheckbox
 type=checkbox value=2532 tabindex=-1 /
 ETC...

 Javascript for master checkbox onclick function:
 function checkAllMsgsIn() {
         alert($('#msgCheckAllInbox').is(:checked));    //Used to debug this
 problem, will always returns false
         $('#msgsInbox input.messageCheckbox').attr('checked', $
 ('#msgCheckAllInbox').is(':checked'));
         //$('#msgsInbox input.messageCheckbox').attr('checked',
 true);  //This will check all the boxes, so my jquery identifier is
 correct.

 }

 I've search through my entire site to make sure there isn't another
 element named 'msgCheckAllInbox'. There is not. So I'm stumped with
 this one.

 Any ideas? Thank you in advance for any help.


[jQuery] Re: is(':checked') always returns false

2009-10-01 Thread Bob

Interesting discovery. Going back to the code that works, if I alert is
(':checked') in the working  code, it also returns false ALWAYS, but
it still works.
Still looking for a solution.


[jQuery] Re: Form Validation errorplacement

2009-10-01 Thread slimshady


 I'm doing appendTo and it keeps putting the error message between the
label and input box?  any ideas what i'm missing please?
it should go in the #warnTitle span tag to the right of the input box


errorPlacement: function(error, element) {
 if (element.attr(id) == title) {
   error.appendTo(#warnTitle);
 }
 else
   error.insertAfter(element);
   },



form id=frmAddTask method=POST action=taskmanager_db.php?
action=insert-newtask
div
label for=titleTitle:span class=required#10058;/
span/label
input type=textbox name=title id=title class=text/
span id=warnTitle/span
/div


[jQuery] Re: change backgroundposition to window width

2009-10-01 Thread Barisko

nevermind, it does work...


(why can't I delete a post...)


On 1 okt, 19:34, Barisko bartko...@gmail.com wrote:
         $(function(){

            var w = $(window).width();

           $('#background').css({backgroundPosition: w + 'px 190px'});

         });

 Could anyone explain to mee why this is not working...?


[jQuery] Re: $.post cross domain first sends an OPTIONS verb?

2009-10-01 Thread Vitaly Piven
btw,

In IE works just fine. Problems with Firefox 3.5.

2009/10/1 Vitaly Piven vitaly.pi...@gmail.com


 Hello David,

 I have similar problem . $.post() sends some OPTIONS request instead
 of expected POST (according to logs of web server).

 On 25 сен, 21:32, David P dpio...@gmail.com wrote:
  I use $.post like so:
 
  $.post(http://mydomain.com/some/webservice;, $.toJSON({ emailAddress:
  emailAddress }), callback, json);
 
  this works great..the response of the POST is a json string and that
  is used in the callback..now I added https:
 
  $.post(https://mydomain.com/some/webservice;, $.toJSON
  ({ emailAddress: emailAddress }), callback, json);
 
  so it is now a cross domain post...in firebug I see that instead of
  POST'ing like in the http case..it first is sending an OPTIONS
  verb..why?  The webservice doesn't know how to respond to that and
  gives a 403 forbidden...I need it to just send the POST like it did
  when it was on the same domain...
 
  Any insight?



[jQuery] Re: Is it possible to use jQuery BlockUI inside a User Control in .NET ?

2009-10-01 Thread Renan

Thank you!

I try this (and variant without the function  $(document).ready
(function() and .click(function()), inside ASCX in my control:

script language=javascript type=text/javascript

$(document).ready(function() {

$('#BUTTON_TEST').click(function() {
$.blockUI({ message: $('%=divPopUp.ClientID %') });
});

$('%=BUTTON_CLOSE.ClientID %').click(function() {
$('%=divPopUp.ClientID %').unblock();
});

});

/script

I show this pop up by a server-side method (called by another page)
that turn visible this div.

Legend:

divPopUp - this is my div that join all element of my popup
BUTTON_TEST - this is a input type submit, inside the divPopUp
BUTTON_CLOSE - this is a image button, inside the divPopUp

Do not work for me and return a error: Run-time execution error of
Microsoft JScript: Object expected

Regards,


On 1 out, 14:00, MorningZ morni...@gmail.com wrote:
 To answer your question on a high level overview:  of course it's
 possible to use the plugin with/inside a user control.  all your
 ASP.NET code is doing, and this is whether it's a stand alone ASPX
 page, one with MasterPages, and/or using User Controls, at the end of
 the page generation you are creating HTML and sending to the client
 browser, at what point the JavaScript/jQuery comes into play

 So figure out what you are generating, where you want to block, and
 wire in your code to .block and .unblock accordingly, and it
 doesn't take clicks or iframes to make the plugin do it's thing

 On Oct 1, 10:04 am, Renan renanrs2...@gmail.com wrote:

  Hello buddys

  I am a ASP.NET developer and I would like to use the jQuery BlockUI
  inside a generic control, designed to show a popup (with javascript
  and CSS effects). My problem is to disable (key tab, enter and mouse
  clicks) the parent window (parent element) (my control is inside the
  page and does not use iframe).

  Inside my control I have a DIV and I show his content when the user
  call the method designed.

  The problem is: I only see the caller of BlockUI using this type of
  eventhandler CLICK, ex:

          $('#pageDemo2').click(function() {
              $.blockUI({ message: 'h1img src=busy.gif / Just a
  moment.../h1' });
              test();
          });

  It is possible apply that property inside the blockUI out of my DIV
  (parent element), inside my control, without click ? Is it necessary
  to use a iframe?

  I try other ways and do not work for me

  Regards,


[jQuery] Re: is(':checked') always returns false

2009-10-01 Thread Bob

Thanks for the link MorningZ

I obviously have issues elsewhere in my code, but I can't paste my
entire site here.
I'm looking for suggestions on what MIGHT be causing this since there
is no obvious error at the moment.

On Oct 1, 11:39 am, Bob bob.nel...@gmail.com wrote:
 Interesting discovery. Going back to the code that works, if I alert is
 (':checked') in the working  code, it also returns false ALWAYS, but
 it still works.
 Still looking for a solution.


[jQuery] Re: Downloading Jquery

2009-10-01 Thread Charlie Griefer
On Thu, Oct 1, 2009 at 9:41 AM, tendai financialsa...@gmail.com wrote:


 Im creating a photo gallery that uses jquery. After downloading jquery
 it wont let me run it. Anybody know whats up with that.



You're really going to have to elaborate if you expect any helpful answers
(other than this one) :)

-- 
Charlie Griefer
http://charlie.griefer.com/

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: Downloading Jquery

2009-10-01 Thread James

What does wont let me run it mean? Are you saving on your computer
and double-clicking on it?
If so, that's not how you use it...
You're suppose to link to it in the script tag in your HTML
document. Make sure the path to the file is correct.

On Oct 1, 6:41 am, tendai financialsa...@gmail.com wrote:
 Im creating a photo gallery that uses jquery. After downloading jquery
 it wont let me run it. Anybody know whats up with that.


[jQuery] Re: is(':checked') always returns false

2009-10-01 Thread James

Do you have another element on your site with id=msgCheckAllInbox?
IDs are suppose to be unique in the entire HTML document.

On Oct 1, 8:53 am, Bob bob.nel...@gmail.com wrote:
 Thanks for the link MorningZ

 I obviously have issues elsewhere in my code, but I can't paste my
 entire site here.
 I'm looking for suggestions on what MIGHT be causing this since there
 is no obvious error at the moment.

 On Oct 1, 11:39 am, Bob bob.nel...@gmail.com wrote:

  Interesting discovery. Going back to the code that works, if I alert is
  (':checked') in the working  code, it also returns false ALWAYS, but
  it still works.
  Still looking for a solution.




[jQuery] Re: Selecting Form Element Labels

2009-10-01 Thread James

I'm sure there are many ways to go about this. Here's one:

var fieldName = 'FirstName';
$(#+fieldName).remove();  // removes input
$(label[for=+fieldName+]).remove();  // removes label

Assuming that your label will always have the same for as the ID of
the input.

On Oct 1, 8:09 am, rob rob.sche...@gmail.com wrote:
 I'm using a form in several places for this project.  I don't want to
 duplicates of this form so I have it as an include file.  Each page
 requires all the same fields, however, there is one page where I'd
 like to remove two fields.

 fieldset
 label for=FirstNameFirst Name/label
 input id=FirstName /
 /fieldset

 Is there a way to remove an input field and it's label by selecting
 the ID of the input field?

 I looked at the JQuery doc, and there's a prev + next selector which
 shows $('label + input').css ... this will set css properties for an
 input element that follows a label element.

 something like $('#FirstName  label + input').remove...


[jQuery] Re: is(':checked') always returns false

2009-10-01 Thread Bob

I've already done a site wide search. I only have one element with
that unique ID. That was my first thought too.

On Oct 1, 12:02 pm, James james.gp@gmail.com wrote:
 Do you have another element on your site with id=msgCheckAllInbox?
 IDs are suppose to be unique in the entire HTML document.

 On Oct 1, 8:53 am, Bob bob.nel...@gmail.com wrote:

  Thanks for the link MorningZ

  I obviously have issues elsewhere in my code, but I can't paste my
  entire site here.
  I'm looking for suggestions on what MIGHT be causing this since there
  is no obvious error at the moment.

  On Oct 1, 11:39 am, Bob bob.nel...@gmail.com wrote:

   Interesting discovery. Going back to the code that works, if I alert is
   (':checked') in the working  code, it also returns false ALWAYS, but
   it still works.
   Still looking for a solution.


[jQuery] Re: (autocomplete) help about extraparams

2009-10-01 Thread James

I don't see what the problem is and what you want help on. You have
the code right there that essentially does what you want.
You just have to build the server-side code to select only cities with
the selected country and a match to the autocomplete text.
... or did you want someone to build all of that for you?

On Oct 1, 6:41 am, pragard otn...@gmail.com wrote:
 Hi, i'm trying the jquery autocomplete from here

 http://docs.jquery.com/Plugins/Autocomplete

 On that page someone said that:
 
 Often one autocompleted field depends on the value of another field.
 In that case, the extraParams option can provide the necessary dynamic
 parameter:

 Consider an example where the states-field reuses the value entered
 into the country field
 

 And the examples was:
 
 $(#states).autocomplete(url, {
    extraParams: {
        country: function() { return $(#country).val(); }
    }
 

 What I'm trying to do is I made a combo box that contain country with
 it's id, and I also have a input text that will do the autocomplete.
 If I select one of the country from the combo box, I want input text
 will show me, when I press some words with autocomplete function, all
 of the city that include in that country (assuming I have it in my
 database).

 What should I do? Can someone give me some examples?

 Thanks.


[jQuery] Re: is(':checked') always returns false

2009-10-01 Thread James

Oops, sorry. I missed your text at the bottom of your initial post.

Try doing it like how MorningZ did in his code. Separate the code:
onclick=checkAllMsgsIn()
and try onchange.

I think what maybe happening is that the function is executing before
the actual checkbox is checked, thus reporting what it is before the
actual change. Just a guess.

On Oct 1, 9:10 am, Bob bob.nel...@gmail.com wrote:
 I've already done a site wide search. I only have one element with
 that unique ID. That was my first thought too.

 On Oct 1, 12:02 pm, James james.gp@gmail.com wrote:

  Do you have another element on your site with id=msgCheckAllInbox?
  IDs are suppose to be unique in the entire HTML document.

  On Oct 1, 8:53 am, Bob bob.nel...@gmail.com wrote:

   Thanks for the link MorningZ

   I obviously have issues elsewhere in my code, but I can't paste my
   entire site here.
   I'm looking for suggestions on what MIGHT be causing this since there
   is no obvious error at the moment.

   On Oct 1, 11:39 am, Bob bob.nel...@gmail.com wrote:

Interesting discovery. Going back to the code that works, if I alert is
(':checked') in the working  code, it also returns false ALWAYS, but
it still works.
Still looking for a solution.




[jQuery] Re: ajax complete function not being called

2009-10-01 Thread James

What happens if you put the whole $.ajax statement in a try/catch
statement? Does it catch?

On Oct 1, 7:24 am, mike randall...@gmail.com wrote:
 Right!  I'm having the same problem--neither the error nor the
 complete are being called.  The request just fails, probably because
 the responseText is not JSON.

 I've had no luck searching around for answers to this either.  Guess
 we'll have to wait until the jQuery JSONP plugin is more mature.
 ( ._.)

 Mike

 On Sep 28, 9:13 pm, Alex bretwal...@gmail.com wrote:

  I'm making a call to a Twitter JSON feed, and when I pass an incorrect
  username, jQuery's ajax complete method never gets called.

  An example of a JSON response that causes complete not to be called
  (nor error, nor success) 
  is:http://twitter.com/users/show.json?screen_name=bhdjbhubeuhfbfbjfbjf

  Here's my code:

  $.ajax({
          type: GET,
          url: http://twitter.com/users/show.json;,
          cache: false,
          data: screen_name= + $('#account-id').val().replace(/^\s*|\s*$/
  g,''),
          dataType: jsonp,
          async: true,
          success: function(j){
                  alert('success');
          },
          error: function(xhr, ajaxOptions, thrownError) {
                  alert(xhr + ' ' + ajaxOptions + ' ' + thrownError);
          },
          complete: function() {
                  alert('finished');
          }

  });

  Any ideas on why the complete method isn't getting called?

  Shouldn't this always get called?

  Thanks!




  1   2   >