[jQuery] Re: jQuery SL - jQuery Silverlight Plugin Feedback

2009-04-11 Thread Koistya `Navin

Thomas,

On 10 апр, 23:30, Thomas Creutz alien...@alientxc.de wrote:
 sorry, but who is using Silverlight? It is limited to Windows, and so it
 cuts down more than 10 % of our visitors. Its again a good thing from M$
 to get a monopoly..

It is also works on Macs, and there is version for Linux - Moonlight.


[jQuery] Re: jQuery SL - jQuery Silverlight Plugin Feedback

2009-04-11 Thread Thomas Creutz
Jordon Bedwell schrieb:
 I suggest you check out http://www.smoothhd.com/ before you start dogging
 Silverlight.  Learn a little about things before you dogg them please.

haha, its not possible, I use Linux ... and Moonlight is not the right
solution.

 
 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
 Behalf Of Koistya `Navin
 Sent: Saturday, April 11, 2009 2:04 AM
 To: jQuery (English)
 Subject: [jQuery] Re: jQuery SL - jQuery Silverlight Plugin Feedback
 
 
 On 10 апр, 23:30, Thomas Creutz alien...@alientxc.de wrote:
 sorry, but who is using Silverlight? It is limited to Windows, and so it
 cuts down more than 10 % of our visitors. Its again a good thing from M$
 to get a monopoly..




signature.asc
Description: OpenPGP digital signature


[jQuery] Re: jQuery SL - jQuery Silverlight Plugin Feedback

2009-04-11 Thread Thomas Creutz
Thomas Creutz schrieb:
 Jordon Bedwell schrieb:
 I suggest you check out http://www.smoothhd.com/ before you start dogging
 Silverlight.  Learn a little about things before you dogg them please.
 
 haha, its not possible, I use Linux ... and Moonlight is not the right
 solution.

because: I have Moonlight installed and also cannot open the side - why
ppl not use java or flash? Its OFFICIAL supported on Win, Mac and Linux too.

Moonlight is not official, so u will have every time problems!

Thomas



signature.asc
Description: OpenPGP digital signature


[jQuery] Re: Endeavour: translating X-Library functionality click-n-drag checkboxes into Jquery

2009-04-11 Thread Lwangaman

Wow I guess you did it! I believe you have succeeded in the endeavour!

On 11 Apr, 06:21, Ricardo ricardob...@gmail.com wrote:
 I think you already got the .dc namespacing thing, so: the mousedown
 is not being bound to the checkbox, but to the container element (the
 table, or in my example below, the UL). When you click a checkbox the
 mousedown event will bubble up to the container and fire this handler.

 As I expected my code had some flaws a few typing errors, see it fixed/
 working here:

 http://jsbin.com/edabo/edit

 I added the ability to specify a selector for the checkboxes, that way
 you can skip the ones you don't want. In case it's not provided all
 checkboxes are used by default.

 cheers,
 - ricardo

 On Apr 10, 8:17 pm, Lwangaman donjohn.f...@gmail.com wrote:

  Ok first of all thanks for taking interest!
  Then, I've tried going through your code and applying it, and I have a
  few questions:
  -- Besides the mouseover.dc that I didn't get either...
  -- I'm supposing that $boxes would be a variable where all the
  checkboxes that are applicable have been stored previously? Yet, if
  you build it as a plugin you have no way of defining which
  checkboxes are to comprised (unless this functionality is built into
  the plugin using data passed through parameters, I suppose).
  -- Then I don't quite understand what the mousedown is being bound
  to. In my example (which was not built as a plugin, but I suppose a
  plugin or defined function would be even better because it's much more
  flexible and anyone can download it and use it), the mousedown was
  being bound to all the cells that had checkboxes in them, and I was
  determining that through the class I had given them
  mychkbox (because I didn't want some of the checkboxes included,
  since they do not have an active state; the table has names,
  addresses, emails, and those that don't have an email have an inactive
  checkbox). I was also trying to follow cross-browser.com's way of
  listening to the mousedown on the cell containing the checkbox rather
  than on the checkbox itself, making the whole click-drag thing a lot
  more user-friendly.

  On 10 Apr, 20:36, jay jay.ab...@gmail.com wrote:

   Just curious.. What is the difference between mouseover.dc and
   mouseover?

   On Apr 10, 1:44 pm, Ricardo ricardob...@gmail.com wrote:

This (untested) is how I envision the code for that:

$.fn.dragCheck = function(){
  //this == the current jQuery element
  return this.each(function(){

    //this == current element in the loop (table etc)
    $(this).bind('mousedown', function(e){

        //don't do anything if you didn't click a checkbox
        if ( !$(e.target).is(':checkbox') )
             return true;

        //get the clicked checkbox state
        isChecked = e.target.checked;
        //apply it to all other checkboxes on mouseover
        $boxes.bind('mouseover.dc', function(){
            this.checked = isChecked;
        });

    }).bind('mouseup', function(e){
        //cancel the mouseover action
        $boxes.unbind('mouseover.dc');
    });

};

$('#table1').dragCheck();

cheers,
- ricardo

On 9 abr, 17:15, Lwangaman donjohn.f...@gmail.com wrote:

 Ok I resolved the cannot assign to a function result problem by
 putting the value assignment into a function(){}:

 48  $(td.mychkbox).each(
 49    function(){
 50      $(this).bind(
 51        mouseover,
 52        function(){
 53          if (gCheckedValue != null){
 54            var eccomi = this;
 55            var eccoti = $(eccomi).find(input:checkbox);
 56*           function(){$(eccoti).attr(checked) = gCheckedValue;}
 57          }
 58        });
 59      });

 Now I don't get any errors, but the event assignments don't seem to be
 working together correctly...
 Basically what's supposed to happen is this:
 1 - onclick event of the checkboxes is canceled since the clicking
 and dragging is being assigned to the table cells that contain them
 2 - the table cells themselves don't actually have on onclick event,
 because the value is given to the checkboxes with the onmousedown
 and especially the onmouseover event.
 3 - onmousedown gives the variable gCheckedValue a value, either
 of true or of false (depending on the actual state of the
 checkbox, so if it is unchecked it will get checked and vice-versa),
 and onmouseup empties gCheckedValue of any value. So as long as
 the mouse is down, gCheckedValue has a value to give to any of the
 checkboxes with the onmouseover event, but as soon as the mouse
 button is released it no longer has a value so the onmouseover event
 will no longer effect any of the checkboxes until the mousebutton is
 pressed again.

 So the value of gCheckedValue is set in the mousedown event, and
 is transmitted in 

[jQuery] Re: Fade Pictures In and Out

2009-04-11 Thread victorg

The problem is that you cant set the opacity of an background-image
itself, it will change the opacity for the entire element.

So, my solution is:
1. Create an element inside the element you want to fade (fading
element)
2. Give it the same dimensions as the parent element
3. Set the parent's position to relative, the fading element to
absolute with a top: 0, left: 0 (so the element you want to fade gets
covered completely)
4. Create an element with a high z-index value, place it after the
fading-element
5. Move all the content from the parent's original contents to this
new container. (so all content will be on top of the fading element)

I created a function which enables you to do this. Check the example @
http:/www.supercow.nl/jquery/fading_background.html

var backgroundFader = function(element, bgClasses)
{
// Properties which need to be set for the layer-on-top-of-fading
element,
this.cssProps = {'position' : 'relative', 'z-index' : 100};
this.bgs  = bgClasses || ['bg1', 'bg2', 'bg3'];
// element which acts as the fading element
this.element  = element || .bg_fader;
};

// Cycles through background classes..
backgroundFader.prototype.cycleBackground = function()
{
var parent  = jQuery(this.element).parent();
var bgs = this.bgs;
jQuery.each(bgs, function(index, value) {
if(parent.hasClass(value))
{
if(index  bgs.length-1)
{

parent.removeClass(value).addClass(bgs[index+1]);
}
else parent.removeClass(value).addClass(bgs[0]);
return false;
}
});
}
// Used to place all the content after the fade container to be
placed in a
// layer with higher z-index then the fading element, so it remains
visible.
backgroundFader.prototype.insertLayer = function()
{
var layerel = this.element.substr(1) + -layer;
if(jQuery(#+layerel).length == 0)
{
jQuery(div id='+layerel+'/div)
.insertAfter(this.element)
.nextAll().appendTo(#+layerel)
.parent().css(this.cssProps);
}
}
// Fades an opaque div container out, causing the background to fade
in
backgroundFader.prototype.fadeIn = function(delay, cycleBg)
{
var props   = this.cssProps;
var element = this.element;
var delay   = delay || 3000;
var obj = this;

jQuery(element).fadeOut(delay, function(){
if(cycleBg) obj.cycleBackground.call(obj);
});
this.insertLayer();
return obj;
}
// Fades an opaque div container in, causing the background to fade
out
backgroundFader.prototype.fadeOut = function(delay, cycleBg)
{

var element  = this.element;
var delay= delay || 3000;
var obj  = this;

jQuery(element).fadeIn(delay, function() {
if(cycleBg) obj.cycleBackground.call(obj);
});
this.insertLayer();
   return obj;
}

google.setOnLoadCallback( function() {
var backgrounds = ['bg2','bg1','bg3'];
d = new backgroundFader(#fade1, backgrounds);
d.fadeIn(3000).fadeOut(3000, true).fadeIn(3000);

});


So much fuss for a fading background, i must be doing something
wrong.. :P


[jQuery] Re: jQuery SL - jQuery Silverlight Plugin Feedback

2009-04-11 Thread Jordon Bedwell

I suggest you check out http://www.smoothhd.com/ before you start dogging
Silverlight.  Learn a little about things before you dogg them please.

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Koistya `Navin
Sent: Saturday, April 11, 2009 2:04 AM
To: jQuery (English)
Subject: [jQuery] Re: jQuery SL - jQuery Silverlight Plugin Feedback


On 10 апр, 23:30, Thomas Creutz alien...@alientxc.de wrote:
 sorry, but who is using Silverlight? It is limited to Windows, and so it
 cuts down more than 10 % of our visitors. Its again a good thing from M$
 to get a monopoly..



[jQuery] Re: jcarousel and text below image

2009-04-11 Thread globalpropertyonline....@gmail.com

Thanks for the response Jay.

I have now added the function as follows in the head and tried the
following two lines at three different places but still no luck. The
errors seems to have gone away now , but I do not see the Bla.

div = $(div style='display:none'blah/div);
$(document.body).appendChild(div);

1) I have put the two lines in the function but no luck,
2) I have put the two lines in the fuction below the Return HTML Get
Element but no luck.
3) I have put it in its own javascript tags below the declaration of
the div as it is but no luck.

This is the function now in the head. You can see my code source here.
http://www.somewhere2rent.com/test/

I have also made the image smaller just in case the text is behind the
image.

script type=text/javascript

$(function()
{
whatever(); {

jcarousel.find(img)
.hover(
function(){
div.css({display:'block',position:'absolute',left:$(this).offset
().left, top:$(this).offset().top+$(this).height()});
},

function(){
div.css({display:'none'});
});

},


});


/script

body


div id=wrap align=center

script type=text/javascript

div = $(div style='display:none'blah/div);
$(document.body).appendChild(div);


/script

  ul id=mycarousel class=jcarousel-skin-ie7
!-- The content will be dynamically loaded in here --
  /ul

/div

/body
/html

ANy more help will be apreciated.

Thanks





On Apr 11, 4:29 am, brian bally.z...@gmail.com wrote:
 There's no need for body onload= when using jquery. As long as the
 library is included, you need only do:

 $(function()
 {
         whatever();

 });

 Here, the whatever() function will run as soon as the DOM is loaded
 (generally, this occurs before the page is displayed).

 On Fri, Apr 10, 2009 at 11:07 PM, globalpropertyonline@gmail.com



 globalpropertyonline@gmail.com wrote:

  Thanks Jay,

  I have put a function Load() in the head and called it in body onload.
  and then add the two lines in Javascript justbelowthe Div is
  declared but it seems to have a javascript error and no Bla is
  displayed.

  I tried to change a few things but no luck.

  This is what I have done.

  script type=text/javascript
  function load()
  {

 jcarousel.find(img)
  .hover(
  function(){
  div.css({display:'block',position:'absolute',left:$(this).offset
  ().left, top:$(this).offset().top+$(this).height()});
  },

  function(){
  div.css({display:'none'});
  });

  }
  /script

  /head

  body onload=load()

  div id=wrap align=center

  script type=text/javascript

  div = $(div style='display:none'blah/div);
  $(document.body).appendChild(div);

  /script

   ul id=mycarousel class=jcarousel-skin-ie7
     !-- The content will be dynamically loaded in here --
   /ul

  /div

  On Apr 11, 12:49 am, jay jay.ab...@gmail.com wrote:
  You can put it at the very bottom and wrap it with script tags, or
  you could put it in the head in script tags like this:
  head
  script
  $(function(){
  ..onload code goes here..});

  /script
  /head

  Also $(document.body).appendChild(div); can go after the div is
  declared instead.  I would suggest you perhaps read some books/
  tutorials on javascript and/or jquery to learn more.  It is very
  different from ASP since ASP is server-side code and javascript is
  client-side.

  On Apr 10, 4:01 pm, globalpropertyonline@gmail.com

  globalpropertyonline@gmail.com wrote:
   Me again

   I tried your code here like this. but it does not seem to work. Any
   pointers ???

   script type=text/javascript

   function mycarousel_itemLoadCallback(carousel, state)
   {
       for (var i = carousel.first; i = carousel.last; i++) {
           if (carousel.has(i)) {
               continue;
           }

           if (i  mycarousel_itemList.length) {
               break;
           }

           // Create an object from HTML
           var item = jQuery(mycarousel_getItemHTML(mycarousel_itemList
   [i-1])).get(0);

           // Apply thickbox
           tb_init(item);

           carousel.add(i, item);
      }

   };

   /**
    * Item html creation helper.
    */
   function mycarousel_getItemHTML(item)
   {
       var url_m = item.url.replace(/_s.jpg/g, '_m.jpg');

       return 'a href=' + url_m + ' title=' + item.title + '
   myrefval=' + item.myref + ' mydescval=' + item.mydesc + '
   myCountryURLval=' + item.myCountryURL + ' myCountryval=' +
   item.myCountry + ' myRegionval=' + item.myRegion + ' myTownval=' +
   item.myTown + ' myTermval=' + item.myTerm + ' myAreaval=' +
   item.myArea + ' myagentcodeval=' + item.myagentcode + 'img src='
   + item.url + ' width=175 height=125 border=0 alt=' +
   item.title + ' //a';

   div = $(div style='display:none'blah/div)

   };

   jQuery(document).ready(function() {
       jQuery('#mycarousel').jcarousel({
           size: mycarousel_itemList.length,
           itemLoadCallback: {onBeforeAnimation:
   mycarousel_itemLoadCallback}
       });

   });

  jcarousel.find(img)
   .hover(
   function(){
   

[jQuery] Re: jQuery SL - jQuery Silverlight Plugin Feedback

2009-04-11 Thread Jordon Bedwell

You confuse the Silverlight project completely. It's not just a player.
It's really actually truly a server. Kind of like Flash Media Server but way
more advanced, they are 10 different leagues apart.  Check out
http://www.streamflashhd.com/ which is an Adobe/Akamai project demonstrating
using Silverlight with Flash. I don't know who in their right mind would
even consider using Java for Video.  If you are going to do that, you might
as well download the HD video to your computer...  Silverlight is really a
server, it's capabilities include downgrading live streams based on your
bandwidth.  It's used by some of the biggest companies, and word around is
Hulu will soon switch to a Flash/Silverlight setup.

Example: If you are at 10MBPS when you first tap the video and then all of a
sudden you drop to 1MBPS bandwidth, it will downgrade the video, and upgrade
the video if you gain more available bandwidth, creating a constant smooth
stream.  Flash alone does not have this capability because it is downloading
the video just as if you were downloading it yourself.  Flash with
silverlight though, it gains this ability.

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Thomas Creutz
Sent: Saturday, April 11, 2009 3:11 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery SL - jQuery Silverlight Plugin Feedback

Thomas Creutz schrieb:
 Jordon Bedwell schrieb:
 I suggest you check out http://www.smoothhd.com/ before you start 
 dogging Silverlight.  Learn a little about things before you dogg them
please.
 
 haha, its not possible, I use Linux ... and Moonlight is not the right 
 solution.

because: I have Moonlight installed and also cannot open the side - why ppl
not use java or flash? Its OFFICIAL supported on Win, Mac and Linux too.

Moonlight is not official, so u will have every time problems!

Thomas




[jQuery] Re: jQuery SL - jQuery Silverlight Plugin Feedback

2009-04-11 Thread Jordon Bedwell

I forgot to mention, all this is live.  No refresh (like Flash alone) and
most of the time, not noticeable unless you have a huge drop in bandwidth
all of a sudden. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jordon Bedwell
Sent: Saturday, April 11, 2009 3:42 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery SL - jQuery Silverlight Plugin Feedback


You confuse the Silverlight project completely. It's not just a player.
It's really actually truly a server. Kind of like Flash Media Server but way
more advanced, they are 10 different leagues apart.  Check out
http://www.streamflashhd.com/ which is an Adobe/Akamai project demonstrating
using Silverlight with Flash. I don't know who in their right mind would
even consider using Java for Video.  If you are going to do that, you might
as well download the HD video to your computer...  Silverlight is really a
server, it's capabilities include downgrading live streams based on your
bandwidth.  It's used by some of the biggest companies, and word around is
Hulu will soon switch to a Flash/Silverlight setup.

Example: If you are at 10MBPS when you first tap the video and then all of a
sudden you drop to 1MBPS bandwidth, it will downgrade the video, and upgrade
the video if you gain more available bandwidth, creating a constant smooth
stream.  Flash alone does not have this capability because it is downloading
the video just as if you were downloading it yourself.  Flash with
silverlight though, it gains this ability.

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Thomas Creutz
Sent: Saturday, April 11, 2009 3:11 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: jQuery SL - jQuery Silverlight Plugin Feedback

Thomas Creutz schrieb:
 Jordon Bedwell schrieb:
 I suggest you check out http://www.smoothhd.com/ before you start 
 dogging Silverlight.  Learn a little about things before you dogg them
please.
 
 haha, its not possible, I use Linux ... and Moonlight is not the right 
 solution.

because: I have Moonlight installed and also cannot open the side - why ppl
not use java or flash? Its OFFICIAL supported on Win, Mac and Linux too.

Moonlight is not official, so u will have every time problems!

Thomas




[jQuery] Re: JQGrid .setGridParam() causing error

2009-04-11 Thread victorg

$(#results).setGridParam is not a function 

This usually means that #results cannot be find in the DOM, are you
sure this is the correct element?

Else i wouldn't know unless you supply a bit more of your source code.


On Apr 10, 9:05 pm, Chuk violinssoundc...@gmail.com wrote:
 Hi.  I'm relatively new to JQGrid, and I'm trying to create my first
 grid that is loaded based on what the user chooses in a select box.
 I've gotten it working for the first option that they choose.
 However, after the grid is populated, I cannot get the data to change
 by selecting a different option in the select box.  The call to the
 server side program is passing the same parameters each time.  So, I
 was looking into changing the parameter with .setGridParam().  I found
 an example on the JQGrid Demonstration page called Search Big Sets
 that is sort of related to what I'm trying to do.  It has a function
 called gridReload that it calls onclick of the submit button.  I set
 it to be executed onchange of my select box.  Here is what my version
 of it looks like

 function gridReload()
 {
   var customer = $(this).val();
   $('#results').setGridParam({url:rinvinqs2?customer=+customer,page:
 1}).trigger(reloadGrid);

 }

 results is the id of the table.  However, an error occurs that
 says:

 $(#results).setGridParam is not a function

 I'm currently at JQGrid version 3.4.1.  Does anyone know what might be
 causing this?

 Thanks.


[jQuery] Re: Endeavour: translating X-Library functionality click-n-drag checkboxes into Jquery

2009-04-11 Thread Lwangaman

BTW that jsbin.com is a great idea! Now does every little project in
there get saved to a url? For example, this one is saved to /edabo?

On 11 Apr, 10:21, Lwangaman donjohn.f...@gmail.com wrote:
 Wow I guess you did it! I believe you have succeeded in the endeavour!

 On 11 Apr, 06:21, Ricardo ricardob...@gmail.com wrote:

  I think you already got the .dc namespacing thing, so: the mousedown
  is not being bound to the checkbox, but to the container element (the
  table, or in my example below, the UL). When you click a checkbox the
  mousedown event will bubble up to the container and fire this handler.

  As I expected my code had some flaws a few typing errors, see it fixed/
  working here:

 http://jsbin.com/edabo/edit

  I added the ability to specify a selector for the checkboxes, that way
  you can skip the ones you don't want. In case it's not provided all
  checkboxes are used by default.

  cheers,
  - ricardo

  On Apr 10, 8:17 pm, Lwangaman donjohn.f...@gmail.com wrote:

   Ok first of all thanks for taking interest!
   Then, I've tried going through your code and applying it, and I have a
   few questions:
   -- Besides the mouseover.dc that I didn't get either...
   -- I'm supposing that $boxes would be a variable where all the
   checkboxes that are applicable have been stored previously? Yet, if
   you build it as a plugin you have no way of defining which
   checkboxes are to comprised (unless this functionality is built into
   the plugin using data passed through parameters, I suppose).
   -- Then I don't quite understand what the mousedown is being bound
   to. In my example (which was not built as a plugin, but I suppose a
   plugin or defined function would be even better because it's much more
   flexible and anyone can download it and use it), the mousedown was
   being bound to all the cells that had checkboxes in them, and I was
   determining that through the class I had given them
   mychkbox (because I didn't want some of the checkboxes included,
   since they do not have an active state; the table has names,
   addresses, emails, and those that don't have an email have an inactive
   checkbox). I was also trying to follow cross-browser.com's way of
   listening to the mousedown on the cell containing the checkbox rather
   than on the checkbox itself, making the whole click-drag thing a lot
   more user-friendly.

   On 10 Apr, 20:36, jay jay.ab...@gmail.com wrote:

Just curious.. What is the difference between mouseover.dc and
mouseover?

On Apr 10, 1:44 pm, Ricardo ricardob...@gmail.com wrote:

 This (untested) is how I envision the code for that:

 $.fn.dragCheck = function(){
   //this == the current jQuery element
   return this.each(function(){

     //this == current element in the loop (table etc)
     $(this).bind('mousedown', function(e){

         //don't do anything if you didn't click a checkbox
         if ( !$(e.target).is(':checkbox') )
              return true;

         //get the clicked checkbox state
         isChecked = e.target.checked;
         //apply it to all other checkboxes on mouseover
         $boxes.bind('mouseover.dc', function(){
             this.checked = isChecked;
         });

     }).bind('mouseup', function(e){
         //cancel the mouseover action
         $boxes.unbind('mouseover.dc');
     });

 };

 $('#table1').dragCheck();

 cheers,
 - ricardo

 On 9 abr, 17:15, Lwangaman donjohn.f...@gmail.com wrote:

  Ok I resolved the cannot assign to a function result problem by
  putting the value assignment into a function(){}:

  48  $(td.mychkbox).each(
  49    function(){
  50      $(this).bind(
  51        mouseover,
  52        function(){
  53          if (gCheckedValue != null){
  54            var eccomi = this;
  55            var eccoti = $(eccomi).find(input:checkbox);
  56*           function(){$(eccoti).attr(checked) = gCheckedValue;}
  57          }
  58        });
  59      });

  Now I don't get any errors, but the event assignments don't seem to 
  be
  working together correctly...
  Basically what's supposed to happen is this:
  1 - onclick event of the checkboxes is canceled since the clicking
  and dragging is being assigned to the table cells that contain them
  2 - the table cells themselves don't actually have on onclick 
  event,
  because the value is given to the checkboxes with the onmousedown
  and especially the onmouseover event.
  3 - onmousedown gives the variable gCheckedValue a value, either
  of true or of false (depending on the actual state of the
  checkbox, so if it is unchecked it will get checked and vice-versa),
  and onmouseup empties gCheckedValue of any value. So as long as
  the mouse is down, gCheckedValue has a value to give to any of the
  checkboxes with the 

[jQuery] Menu Hover and Selected

2009-04-11 Thread Takaya213


Hi

I have the following jQuery code, but it doesn't seem to work 100%:
$('.nav a img').hover(
function(){
if($(this).attr(src).indexOf(_on) == -1) {
var newSrc = 
$(this).attr(src).replace(.png,_on.png);
$(this).attr(src,newSrc);
}
},
function(){
if($(this).attr(src).indexOf(_on.png) != -1) {
var oldSrc = 
$(this).attr(src).replace(_on.png,.png);
$(this).attr(src,oldSrc);
}
}
);

I am currently using it on the menu on my website
http://www.njwebdesign.co.za/

I want the selected/highlighted page to stay highlighted when it is hovered
over and not to be deselected. This is not currently working with the above
piece of code, if you have anything better or can help me fix the above, it
will be greatly appreciated.

Thanks. :-((
-- 
View this message in context: 
http://www.nabble.com/Menu-Hover-and-Selected-tp22999583s27240p22999583.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Endeavour: translating X-Library functionality click-n-drag checkboxes into Jquery

2009-04-11 Thread Lwangaman

Now going back to my original example, I also had a separate checkbox
that when checked checked all the others, and should cancel the
mousedown event applied to those checkboxes. So this is how I went
about doing it using your code:

-- I namespaced the mousedown event (mousedown.ac)
-- I closed the call to the function in a condition:
if (allchecked.attr(checked)==false){
$('#table1').dragCheck('td.mychkbox :checkbox');
}
-- Then I applied an onclick event to the separate comanding
checkbox that unbinds the mousedown event when checked and calls the
function again when unchecked:
allchecked.click(function(){
if (allchecked.attr(checked)==false){
$('#table1').dragCheck('td.mychkbox :checkbox');
}
else {$('#table1').unbind('mousedown.ac')}
  });

(allchecked is the variable I stored the checkbox in:
 var allchecked = $(input#checkedall)  )

And this seems to work just great!

On 11 Apr, 06:21, Ricardo ricardob...@gmail.com wrote:
 I think you already got the .dc namespacing thing, so: the mousedown
 is not being bound to the checkbox, but to the container element (the
 table, or in my example below, the UL). When you click a checkbox the
 mousedown event will bubble up to the container and fire this handler.

 As I expected my code had some flaws a few typing errors, see it fixed/
 working here:

 http://jsbin.com/edabo/edit

 I added the ability to specify a selector for the checkboxes, that way
 you can skip the ones you don't want. In case it's not provided all
 checkboxes are used by default.

 cheers,
 - ricardo

 On Apr 10, 8:17 pm, Lwangaman donjohn.f...@gmail.com wrote:

  Ok first of all thanks for taking interest!
  Then, I've tried going through your code and applying it, and I have a
  few questions:
  -- Besides the mouseover.dc that I didn't get either...
  -- I'm supposing that $boxes would be a variable where all the
  checkboxes that are applicable have been stored previously? Yet, if
  you build it as a plugin you have no way of defining which
  checkboxes are to comprised (unless this functionality is built into
  the plugin using data passed through parameters, I suppose).
  -- Then I don't quite understand what the mousedown is being bound
  to. In my example (which was not built as a plugin, but I suppose a
  plugin or defined function would be even better because it's much more
  flexible and anyone can download it and use it), the mousedown was
  being bound to all the cells that had checkboxes in them, and I was
  determining that through the class I had given them
  mychkbox (because I didn't want some of the checkboxes included,
  since they do not have an active state; the table has names,
  addresses, emails, and those that don't have an email have an inactive
  checkbox). I was also trying to follow cross-browser.com's way of
  listening to the mousedown on the cell containing the checkbox rather
  than on the checkbox itself, making the whole click-drag thing a lot
  more user-friendly.

  On 10 Apr, 20:36, jay jay.ab...@gmail.com wrote:

   Just curious.. What is the difference between mouseover.dc and
   mouseover?

   On Apr 10, 1:44 pm, Ricardo ricardob...@gmail.com wrote:

This (untested) is how I envision the code for that:

$.fn.dragCheck = function(){
  //this == the current jQuery element
  return this.each(function(){

    //this == current element in the loop (table etc)
    $(this).bind('mousedown', function(e){

        //don't do anything if you didn't click a checkbox
        if ( !$(e.target).is(':checkbox') )
             return true;

        //get the clicked checkbox state
        isChecked = e.target.checked;
        //apply it to all other checkboxes on mouseover
        $boxes.bind('mouseover.dc', function(){
            this.checked = isChecked;
        });

    }).bind('mouseup', function(e){
        //cancel the mouseover action
        $boxes.unbind('mouseover.dc');
    });

};

$('#table1').dragCheck();

cheers,
- ricardo

On 9 abr, 17:15, Lwangaman donjohn.f...@gmail.com wrote:

 Ok I resolved the cannot assign to a function result problem by
 putting the value assignment into a function(){}:

 48  $(td.mychkbox).each(
 49    function(){
 50      $(this).bind(
 51        mouseover,
 52        function(){
 53          if (gCheckedValue != null){
 54            var eccomi = this;
 55            var eccoti = $(eccomi).find(input:checkbox);
 56*           function(){$(eccoti).attr(checked) = gCheckedValue;}
 57          }
 58        });
 59      });

 Now I don't get any errors, but the event assignments don't seem to be
 working together correctly...
 Basically what's supposed to happen is this:
 1 - onclick event of the checkboxes is canceled since the clicking
 and dragging is being assigned to the table cells that contain them
 2 - the table cells themselves don't actually 

[jQuery] Re: Menu Hover and Selected

2009-04-11 Thread victorg

Maybe you should switch it to make use of the mouseover event only,
and on mouseover change all menu items to off status and set the
curret one to on?

 $(.nav a img).mouseover(function() {
 // clear all menu items with _on img
$(.nav a img).each(function(){
var src = $(this).attr(src);
if(src.indexOf(_on) != -1)
{
$(this).attr(src, src.replace(_on.png, 
.png));
}
});
// set current menu item to on
var src = $(this).attr(src);
$(this).attr(src, src.replace(.png, _on.png));
});


On Apr 11, 11:56 am, Takaya213 nic...@njwebdesign.co.za wrote:
 Hi

 I have the following jQuery code, but it doesn't seem to work 100%:
         $('.nav a img').hover(
                 function(){
                         if($(this).attr(src).indexOf(_on) == -1) {
                                 var newSrc = 
 $(this).attr(src).replace(.png,_on.png);
                                 $(this).attr(src,newSrc);
                         }
                 },
                 function(){
                         if($(this).attr(src).indexOf(_on.png) != -1) {
                                 var oldSrc = 
 $(this).attr(src).replace(_on.png,.png);
                                 $(this).attr(src,oldSrc);
                         }
                 }
         );

 I am currently using it on the menu on my websitehttp://www.njwebdesign.co.za/

 I want the selected/highlighted page to stay highlighted when it is hovered
 over and not to be deselected. This is not currently working with the above
 piece of code, if you have anything better or can help me fix the above, it
 will be greatly appreciated.

 Thanks. :-((
 --
 View this message in 
 context:http://www.nabble.com/Menu-Hover-and-Selected-tp22999583s27240p229995...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Managing scripts in AJAX applications

2009-04-11 Thread Jason Huck

On Apr 1, 1:39 pm, JMan jbeck...@gmail.com wrote:
 One thing I have been struggling with is AJAX applications is managing
 the js code that powers them.

 For example if you have a page that loads content from an AJAX call to
 the server and that content also has js code associated with it in
 order to function how do I manage that code? If I have 20 pages that
 get loaded from the server via AJAX at one point or another I do not
 want to have one huge js file with a bunch of code for each page in
 it.


JMan,

Consider letting your server side framework manage your scripts for
you. Instead of using $.getScript to include required scripts on the
fly on the client side, I push them into a list as needed on the
server side, and then a process combines all of the individual scripts
into one large one, runs it through YUI Compressor, writes it to disk,
and inserts a link to it in the final assembled HTML. Everything gets
cached, too, so that process is only repeated when a script is added,
modified, or removed in the mix for a particular request.

This lets me manage all of my scripts which are specific to single
screens/pages in their own organized, easy to find, external
little .js files, but still take advantage of the performance gains
provided from externalizing the scripts, reducing the total number of
HTTP requests, and using compression and minification. It works for
CSS files, too!

I've been using some variation of this system for a couple of years
now on various sites, and have been very pleased with the performance
and productivity gains. It's written in Lasso, but the concepts are
straightforward enough that it should be easy to implement in other
languages.

The gist of it is this: There's an asset_manager class that you
initialize up front. It grabs whatever items you deem global (i.e.,
the base jQuery library, a CSS reset, etc.) automatically. Then, as
the rest of the request is processed, you can add additional scripts
and styles either implicitly or explicitly. The implicit method
replaces a normal server side 'include' with one that checks for the
existence of matching .js and .css files, so instead of this:

include('/path/to/include.inc')


...I do this:

asset_manager-load('/path/to/include.inc')


...and if these files exist on disk:

/path/to/include.js
/path/to/include.css


...they are automatically included. If there are additional plugins,
etc. that I need to add for a particular include, I add them
explicitly within the include like so:

asset_manager-add('/path/to/plugins/jquery.plugin.js')


I presented the system as part of a talk on client-side optimization
last year at the Lasso Developer Conference in Chicago. It covers the
13 original rules from the Yahoo! Exceptional Performance Team that
became the basis of the tests used by the YSlow plugin for Firebug,
and then explains how this system automates adherence to many of those
rules. The paper, slides, and sample code that I presented are
available here:

http://devblog.jasonhuck.com/2008/09/23/an-asset-management-system-for-lasso-powered-sites/


- jason




[jQuery] JQuery UI tabs and pagination

2009-04-11 Thread Claudio Poli

hi everyone,
I've this situation: an X number of tabs; in tabs content there's a
div classed .to_be_replaced and links for paginating.
when I click on a link it should replace the content
of .to_be_replaced.

The problem here is that every div.to_be_replaced gets replaced, and
not only the one that belongs to the currently shown tab.

this is the code:

$('#tabcontainer').tabs({
show: function(event, ui) {
$('div.pagination a', ui.panel).live('click',
function() {
$.blockUI({
message: null
});
$(ui.panel, .to_be_replaced).load(this.href);
return false;
});
}
});

any help is appreciated, thanks.


[jQuery] How to remove error messages from Validation Plugin

2009-04-11 Thread Rick

I'm using this plugin in its simplest form.. 
http://docs.jquery.com/Plugins/Validation

All I have is this for my code:

script
$(document).ready(function(){
$(#form).validate();
});
/script

It works fine, but I'm trying to hide the error messages which it
defaults to This field is required. The error message shows up in a
label..

How in the world do I hide those error messages within those labels???
I'm sure it's easy, but I cannot find any examples anywhere!!

Thanks to whoever helps out..


[jQuery] jQuery plugin: Validation

2009-04-11 Thread Rick

I'm using this plugin in its simplest form.. 
http://docs.jquery.com/Plugins/Validation

All I have is this for my code:

script
$(document).ready(function(){
$(#form).validate();
});
/script

It works fine, but I'm trying to hide the error messages which it
defaults to This field is required. The error message shows up in a
label..

How in the world do I hide those error messages within those labels???
I'm sure it's easy, but I cannot find any examples anywhere!!

Thanks to whoever helps out..



[jQuery] replacing entire html node having jquery trigger document.ready again for new content

2009-04-11 Thread e.sand

Hi,

I have done a lot of searching and experimenting and haven't come up
with a solution to my issue.  There have been some people with
somewhat similar questions, but nobody seems to be trying to replace
the entire html node in a document and have all the script tags
(especially including the $(document).ready() stuff).

Essentially what I am trying to do (and why I'm doing it) is submit a
form via AJAX that is self-posting (action=).  The back-end is done
via PHP which takes care of handling the POST data when posted to.  I
do self-posting so that if a client doesn't have JS enabled, the form
works normally.  The form just updates itself and needs to display the
updated information, so when it's posted to, the output is essentially
the new HTML I want to display - no problem without JS... but using
AJAX is where my troubles come in.

The page contains some script tags in the head node - two are external
JS files, but the last one is inline code that uses jQuery(function($)
{...}); to run stuff once the document is ready (this is doing just a
few things now - some dynamic css formatting, binding a keypress event
and also binding a submit event for the form so it can do an AJAX
post).

I can grab the new data and replace the old data in the DOM just fine,
but since jQuery apparently only runs the document.ready stuff once
(and then even worse - discards it), the replaced data doesn't have
any of the css styling or events bound to it which are all required.
My thought was that perhaps (and this would be preferrable) I could
replace the entire html node in the document with the new data I got
back from my AJAX post - and have the JS code run again (which would
re-execute the document.ready stuff and hopefully trigger a new
document.ready event so it would do the css styling and bind events to
the new data I placed in the DOM).

However, the problem seems to be with the script tags in the head
node.  If I watch in firebug, I see my browser fetch the two external
JS files if I do replace the entire html node... but I don't know
what's going on with my inline code, because all three of the script
tags that are in the head get *removed* when I replace the html node
in the DOM.  So, I don't know if that inline code is being executed,
or simply ignored... and also, no new document.ready event is being
triggered (and triggering it manually doesn't seem to do anything for
me).

The only working solution I've come up with is to put all the code I
want to run at document.ready in to a function I called doInit(), and
then have my document.ready function call that doInit() function...
and when I do my AJAX post, after I replace the new data in the DOM
(I'm not replacing the entire html node - just my form that changes),
I call doInit() manually again.  This works, but is certainly not
optimal in case in the future I want to add functions or other stuff
when I POST the form data (as in, the document changes when the form
is submitted).

Is there any way to have jQuery replace the entire html node *and* re-
load all the script tags, including inline code + trigger a
document.ready event?

(PS, I'm using AJAX for the form submittal for a few reasons - one
specifically being to circumvent the browser cache - as in, making
sure that going back/forward in browser history doesn't cause those
you must re-submit data to display this page if you go back in
history).

Thanks!


[jQuery] Re: Fade Pictures In and Out

2009-04-11 Thread Maurice Kroon

hi, not sure if this helps much, but it might put u in the right
direction.

As you've already mastered 'fading content in and out' you can do the
same with about everything, including images or divs.
What you should do is make a div and set it as background. This div
will have that css background of yours. You'll just fade in/out the
div  ure done.
Of course, you can make it a bit more dynamic if you want to do more
then 1 div, make a dynamic loop for instance.

Good luck!

On Apr 11, 12:25 am, PF piercefree...@gmail.com wrote:
 I should also add that the image has to change every few seconds once
 the page has loaded.

 On Apr 10, 3:14 pm, PF piercefree...@gmail.com wrote:

  Hi everyone.

  I asked awhile ago about fading content in and out, now I am wondering
  how to fade images in and out. The images will be in the background of
  the page (css: background-image) so I am not quite sure how I could
  integrate this.  Any help would be appreciated!


[jQuery] .ajax with php response

2009-04-11 Thread dttowns...@googlemail.com

Hi,

I'm trying to get an echo output from a php page called through
jquery's .ajax function:

code
$.ajax({
url:'php/cms_ne_edit.php',
type:'POST',
data:'ne_id='+ne_id,
success:function(results) {...}
};
/code

which calls a page containing an echo which itself contains a new form
with, and heres where im having trouble, a js call to freeTextEditor:

code
form..
script type='text/javascript'
initRTE('', 'example.css');
/script
.../form
/code

The response is a new page containing only the output from the initRTE
function (the text editor only, sitting in its own page all alone),
not the whole form within the original page as expected.
freeTextEditor works fine when called on page load, but is messing up
when called through ajax (omitting initRTE(...) from the ajax call
works fine).

Has anyone had any experience of this? I'm stumped.


[jQuery] Homemade, finder-like menu - problems with (un)hiding columns on click

2009-04-11 Thread Maurice Kroon

Hi,

First of all, I wanted to thank you guys since you always help me out
here.

Second, about my problem.. I'm trying to write some jquery code here,
but I've been stuck with it for days.
What i want to do is a sort of finder-like (on mac) menu. Goal is to
select a category. But, categories can be very deep, so i want to add
some animation.

Now, so far, I've got:
one big ul that is transformed into nice lists
when an item is clicked, it opens up subcategories (if there are)
and some layout changes

but, however. As you can see if you test it out, there is some serious
strange behavior going on..

If you follow the path: 'follow' you'll see what i mean, as soon as
you click somewhere else.
The goal is that there are always a maximum of 4 columns visible. If
there are 5 one hides. If there are 3, the fourth one shows (if there
is any). Etc.. Now, i thought this seems pretty logical and easy, but
I'm really, really stuck with it.

Currently the page is at: http://bucee.xapss.com/category.html

Thanks a lot!

Could you help me out? Really, really thanks in advance! Maybe i could
turn it into a plugin after, if this works it seems kinda neat i
think.

Thanks in advance!


[jQuery] [Superfish] How to make secondary menu (i.e. the hover menu) horizontal instead of vertical

2009-04-11 Thread Stephen

Hi,

I'm working with Superfish drop down menu which implements JQuery.
Have it installed on Joomla 1.5.7 and am working on making the second-
level menu horizontal.  Right now hovering over a menu item with child
items produces a vertical list.. I've tried to manipulate the CSS so
that the li child items have {display:inline; list-style-type:none;}
but it's not working.

Not sure if I'm applying to the right CSS class or if CSS is the
answer.

Any help would be appreciated.

Stephen


[jQuery] Find and replace character inside div

2009-04-11 Thread jc_2009

Hi,

How to do a find and replace with Jquery.

For example...

Current:
div id=fruitsApple;Banana;Orange;Peach/div

I want it to look like this:
div id=fruitsApplebr /Bananabr /Orangebr /Peach/div

I found and tried this code but it only does the first one. I don't
know how to loop it.

var f = $('#fruits');
f.html(f.html().replace(;, br /));

Any help would be appreciated. Thanks!


[jQuery] addClass (et al) malfunctioning in IE7

2009-04-11 Thread jnoob

im trying to perform a simple $(element).addClass('className', 1000);
and while it runs smoothly in FF, IE7 is broken. the line of code is
executed, but the element doesnt alter its appearance. when a second
line of removeClass is executed, the element takes on the appearance
of the 'className' class, with no animation. meaning it does the
opposite thing and misses the morph..

ive spent a number of hours now, playing with code, trying to do the
same thing through an .animate() function, etc. ive googled this, and
yet it seems nobody else has come across this. which usually means the
problem is with me. yet my code is pretty simple. in addition, simple
examples of addClass - from example pages, arent working in my IE.
e.g. http://docs.jquery.com/UI/Effects/addClass
is this a known issue, or is it something that sounds irregular?


[jQuery] Re: Find and replace character inside div

2009-04-11 Thread Karl Swedberg

You'll probably want to set the global flag and use regex notation.

var f = $('#fruits');
f.html(f.html().replace(/;/g, br /));


--Karl


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




On Apr 10, 2009, at 5:23 PM, jc_2009 wrote:



Hi,

How to do a find and replace with Jquery.

For example...

Current:
div id=fruitsApple;Banana;Orange;Peach/div

I want it to look like this:
div id=fruitsApplebr /Bananabr /Orangebr /Peach/div

I found and tried this code but it only does the first one. I don't
know how to loop it.

var f = $('#fruits');
f.html(f.html().replace(;, br /));

Any help would be appreciated. Thanks!




[jQuery] change LI class onclick of A inside

2009-04-11 Thread kevind

i'm using Glossymenu at dynamic drive:

http://www.dynamicdrive.com/style/csslibrary/item/glossy_horizontal_menu/

what i want to accomplish is when I click one of the links inside the
LI element, the LI's in the UL lose their class of 'current' and the
clicked LI gains the class 'current'

i have the menu driving links to open content in an iframe so, i'm not
going to reload the menu each time i choose a different tab - this is
why i wish to use jquery.

can someone correct my syntax - i can't seem to get it to work

$(li.glossymenu).bind(onclick,function(){
$(li.glossymenu).removeclass('current');
$(this).addclass('current');
};
);

thanks


[jQuery] Re: Menu Hover and Selected

2009-04-11 Thread Takaya213


Nope, not quite what I was looking for.

I want the one that is selected (page that you are on e.g. Home) to stay
selected when one hovers over it, and the others to show a hover and then
change back to the unselected state, but the one that is selected (page you
are on) to stay selected.



victorg-2 wrote:
 
 
 Maybe you should switch it to make use of the mouseover event only,
 and on mouseover change all menu items to off status and set the
 curret one to on?
 
  $(.nav a img).mouseover(function() {
// clear all menu items with _on img
   $(.nav a img).each(function(){
   var src = $(this).attr(src);
   if(src.indexOf(_on) != -1)
   {
   $(this).attr(src, src.replace(_on.png, 
 .png));
   }
   });
   // set current menu item to on
   var src = $(this).attr(src);
   $(this).attr(src, src.replace(.png, _on.png));
 });
 

-- 
View this message in context: 
http://www.nabble.com/Menu-Hover-and-Selected-tp22999583s27240p23000987.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Find and replace character inside div

2009-04-11 Thread victorg

I think you would be best off with a Regular Expression:

var f = $(#fruits);
f.html( f.html().replace(/;/g,br/) );

/g enables global matching. When using the replace() method,
specify this modifier to replace all matches, rather than only the
first one.
http://www.regular-expressions.info/javascript.html


On Apr 10, 11:23 pm, jc_2009 joh.des...@gmail.com wrote:
 Hi,

 How to do a find and replace with Jquery.

 For example...

 Current:
 div id=fruitsApple;Banana;Orange;Peach/div

 I want it to look like this:
 div id=fruitsApplebr /Bananabr /Orangebr /Peach/div

 I found and tried this code but it only does the first one. I don't
 know how to loop it.

 var f = $('#fruits');
 f.html(f.html().replace(;, br /));

 Any help would be appreciated. Thanks!


[jQuery] Re: Menu Hover and Selected

2009-04-11 Thread victorg

Ah, guess i misunderstood.

A way to handle that could be to check what the current page is and
highlight the menu item of the link who has a href to that page.
And add an extra check to the mouseout function to only remove the _on
suffix if its not the current page.

Would something like this work?

$('.nav a img').hover(
function(){
if($(this).attr(src).indexOf(_on) == -1) {
var newSrc = 
$(this).attr(src).replace(.png,_on.png);
$(this).attr(src,newSrc);
}
},
function(){
var activePage = window.location.pathname.substr(1);
if($(this).parent().attr(href) != activePage) {
if($(this).attr(src).indexOf(_on.png) != 
-1) {
var oldSrc = 
$(this).attr(src).replace(_on.png,.png);
$(this).attr(src,oldSrc);
}
}
}
);

var activePage = window.location.pathname.substr(1);
$(a[href=+activePage+] img).trigger(mouseover);



On Apr 11, 3:04 pm, Takaya213 nic...@njwebdesign.co.za wrote:
 Nope, not quite what I was looking for.

 I want the one that is selected (page that you are on e.g. Home) to stay
 selected when one hovers over it, and the others to show a hover and then
 change back to the unselected state, but the one that is selected (page you
 are on) to stay selected.



 victorg-2 wrote:

  Maybe you should switch it to make use of the mouseover event only,
  and on mouseover change all menu items to off status and set the
  curret one to on?

   $(.nav a img).mouseover(function() {
      // clear all menu items with _on img
     $(.nav a img).each(function(){
                     var src = $(this).attr(src);
                     if(src.indexOf(_on) != -1)
                     {
                             $(this).attr(src, src.replace(_on.png, 
  .png));
                     }
     });
     // set current menu item to on
     var src = $(this).attr(src);
     $(this).attr(src, src.replace(.png, _on.png));
  });

 --
 View this message in 
 context:http://www.nabble.com/Menu-Hover-and-Selected-tp22999583s27240p230009...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: JQuery UI tabs and pagination

2009-04-11 Thread Klaus Hartl

Use:

$(.to_be_replaced, ui.panel).load(this.href);


--Klaus



On 11 Apr., 12:00, Claudio Poli masterk...@gmail.com wrote:
 hi everyone,
 I've this situation: an X number of tabs; in tabs content there's a
 div classed .to_be_replaced and links for paginating.
 when I click on a link it should replace the content
 of .to_be_replaced.

 The problem here is that every div.to_be_replaced gets replaced, and
 not only the one that belongs to the currently shown tab.

 this is the code:

     $('#tabcontainer').tabs({
         show: function(event, ui) {
             $('div.pagination a', ui.panel).live('click',
             function() {
                 $.blockUI({
                     message: null
                 });
                 $(ui.panel, .to_be_replaced).load(this.href);
                 return false;
             });
         }
     });

 any help is appreciated, thanks.


[jQuery] Re: change LI class onclick of A inside

2009-04-11 Thread victorg

The problem is that you are selecting li items which have the class
glossymenu (li.glossymenu).

While you actually need :ul.glossymenu li.

So something like this should work :)



$(ul.glossymenu li).bind(onclick,function(){
$(ul.glossymenu li).removeclass('current');
$(this).addclass('current');
};
);

On Apr 11, 3:03 pm, kevind kevint...@gmail.com wrote:
 i'm using Glossymenu at dynamic drive:

 http://www.dynamicdrive.com/style/csslibrary/item/glossy_horizontal_m...

 what i want to accomplish is when I click one of the links inside the
 LI element, the LI's in the UL lose their class of 'current' and the
 clicked LI gains the class 'current'

 i have the menu driving links to open content in an iframe so, i'm not
 going to reload the menu each time i choose a different tab - this is
 why i wish to use jquery.

 can someone correct my syntax - i can't seem to get it to work

 $(li.glossymenu).bind(onclick,function(){
                 $(li.glossymenu).removeclass('current');
                 $(this).addclass('current');
         };
         );

 thanks


[jQuery] Re: Menu Hover and Selected

2009-04-11 Thread Takaya213


That's ok, we all misunderstand things at sometime or other.

Unfortunatly this still removes the selected state of the button.

Maybe it is due to the way that i am giving the button its selected state.


victorg-2 wrote:
 
 
 Ah, guess i misunderstood.
 
 A way to handle that could be to check what the current page is and
 highlight the menu item of the link who has a href to that page.
 And add an extra check to the mouseout function to only remove the _on
 suffix if its not the current page.
 
 Would something like this work?
 
 $('.nav a img').hover(
   function(){
   if($(this).attr(src).indexOf(_on) == -1) {
   var newSrc = 
 $(this).attr(src).replace(.png,_on.png);
   $(this).attr(src,newSrc);
   }
   },
   function(){
   var activePage = window.location.pathname.substr(1);
   if($(this).parent().attr(href) != activePage) {
   if($(this).attr(src).indexOf(_on.png) != 
 -1) {
   var oldSrc = 
 $(this).attr(src).replace(_on.png,.png);
   $(this).attr(src,oldSrc);
   }
   }
   }
 );
 
 var activePage = window.location.pathname.substr(1);
 $(a[href=+activePage+] img).trigger(mouseover);
 
 

-- 
View this message in context: 
http://www.nabble.com/Menu-Hover-and-Selected-tp22999583s27240p23001350.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: change LI class onclick of A inside

2009-04-11 Thread victorg

Oops, forgot the case on removeClass and addClass:

 $(ul.glossymenu li).bind(onclick,function(){
 $(ul.glossymenu li).removeClass('current');
 $(this).addClass('current');
 };
 );

On Apr 11, 3:50 pm, victorg vr.gerrit...@gmail.com wrote:
 The problem is that you are selecting li items which have the class
 glossymenu (li.glossymenu).

 While you actually need :ul.glossymenu li.

 So something like this should work :)

 $(ul.glossymenu li).bind(onclick,function(){
                 $(ul.glossymenu li).removeclass('current');
                 $(this).addclass('current');
         };
         );

 On Apr 11, 3:03 pm, kevind kevint...@gmail.com wrote:

  i'm using Glossymenu at dynamic drive:

 http://www.dynamicdrive.com/style/csslibrary/item/glossy_horizontal_m...

  what i want to accomplish is when I click one of the links inside the
  LI element, the LI's in the UL lose their class of 'current' and the
  clicked LI gains the class 'current'

  i have the menu driving links to open content in an iframe so, i'm not
  going to reload the menu each time i choose a different tab - this is
  why i wish to use jquery.

  can someone correct my syntax - i can't seem to get it to work

  $(li.glossymenu).bind(onclick,function(){
                  $(li.glossymenu).removeclass('current');
                  $(this).addclass('current');
          };
          );

  thanks


[jQuery] Re: JQuery UI tabs and pagination

2009-04-11 Thread Claudio Poli


whops, thanks for pointing it out.

claudio

Il giorno 11/apr/09, alle ore 15:46, Klaus Hartl ha scritto:



Use:

$(.to_be_replaced, ui.panel).load(this.href);


--Klaus



On 11 Apr., 12:00, Claudio Poli masterk...@gmail.com wrote:

hi everyone,
I've this situation: an X number of tabs; in tabs content there's a
div classed .to_be_replaced and links for paginating.
when I click on a link it should replace the content
of .to_be_replaced.

The problem here is that every div.to_be_replaced gets replaced, and
not only the one that belongs to the currently shown tab.

this is the code:

$('#tabcontainer').tabs({
show: function(event, ui) {
$('div.pagination a', ui.panel).live('click',
function() {
$.blockUI({
message: null
});
$(ui.panel, .to_be_replaced).load(this.href);
return false;
});
}
});

any help is appreciated, thanks.




[jQuery] Re: Endeavour: translating X-Library functionality click-n-drag checkboxes into Jquery

2009-04-11 Thread Lwangaman

Hmm, just noticed one problem though... A single click on a checkbox
is supposed to work too, but with this code as soon as you mouseup the
value goes back the other way... You have to drag off in order to keep
the value in there...

On 11 Apr, 06:21, Ricardo ricardob...@gmail.com wrote:
 I think you already got the .dc namespacing thing, so: the mousedown
 is not being bound to the checkbox, but to the container element (the
 table, or in my example below, the UL). When you click a checkbox the
 mousedown event will bubble up to the container and fire this handler.

 As I expected my code had some flaws a few typing errors, see it fixed/
 working here:

 http://jsbin.com/edabo/edit

 I added the ability to specify a selector for the checkboxes, that way
 you can skip the ones you don't want. In case it's not provided all
 checkboxes are used by default.

 cheers,
 - ricardo

 On Apr 10, 8:17 pm, Lwangaman donjohn.f...@gmail.com wrote:

  Ok first of all thanks for taking interest!
  Then, I've tried going through your code and applying it, and I have a
  few questions:
  -- Besides the mouseover.dc that I didn't get either...
  -- I'm supposing that $boxes would be a variable where all the
  checkboxes that are applicable have been stored previously? Yet, if
  you build it as a plugin you have no way of defining which
  checkboxes are to comprised (unless this functionality is built into
  the plugin using data passed through parameters, I suppose).
  -- Then I don't quite understand what the mousedown is being bound
  to. In my example (which was not built as a plugin, but I suppose a
  plugin or defined function would be even better because it's much more
  flexible and anyone can download it and use it), the mousedown was
  being bound to all the cells that had checkboxes in them, and I was
  determining that through the class I had given them
  mychkbox (because I didn't want some of the checkboxes included,
  since they do not have an active state; the table has names,
  addresses, emails, and those that don't have an email have an inactive
  checkbox). I was also trying to follow cross-browser.com's way of
  listening to the mousedown on the cell containing the checkbox rather
  than on the checkbox itself, making the whole click-drag thing a lot
  more user-friendly.

  On 10 Apr, 20:36, jay jay.ab...@gmail.com wrote:

   Just curious.. What is the difference between mouseover.dc and
   mouseover?

   On Apr 10, 1:44 pm, Ricardo ricardob...@gmail.com wrote:

This (untested) is how I envision the code for that:

$.fn.dragCheck = function(){
  //this == the current jQuery element
  return this.each(function(){

    //this == current element in the loop (table etc)
    $(this).bind('mousedown', function(e){

        //don't do anything if you didn't click a checkbox
        if ( !$(e.target).is(':checkbox') )
             return true;

        //get the clicked checkbox state
        isChecked = e.target.checked;
        //apply it to all other checkboxes on mouseover
        $boxes.bind('mouseover.dc', function(){
            this.checked = isChecked;
        });

    }).bind('mouseup', function(e){
        //cancel the mouseover action
        $boxes.unbind('mouseover.dc');
    });

};

$('#table1').dragCheck();

cheers,
- ricardo

On 9 abr, 17:15, Lwangaman donjohn.f...@gmail.com wrote:

 Ok I resolved the cannot assign to a function result problem by
 putting the value assignment into a function(){}:

 48  $(td.mychkbox).each(
 49    function(){
 50      $(this).bind(
 51        mouseover,
 52        function(){
 53          if (gCheckedValue != null){
 54            var eccomi = this;
 55            var eccoti = $(eccomi).find(input:checkbox);
 56*           function(){$(eccoti).attr(checked) = gCheckedValue;}
 57          }
 58        });
 59      });

 Now I don't get any errors, but the event assignments don't seem to be
 working together correctly...
 Basically what's supposed to happen is this:
 1 - onclick event of the checkboxes is canceled since the clicking
 and dragging is being assigned to the table cells that contain them
 2 - the table cells themselves don't actually have on onclick event,
 because the value is given to the checkboxes with the onmousedown
 and especially the onmouseover event.
 3 - onmousedown gives the variable gCheckedValue a value, either
 of true or of false (depending on the actual state of the
 checkbox, so if it is unchecked it will get checked and vice-versa),
 and onmouseup empties gCheckedValue of any value. So as long as
 the mouse is down, gCheckedValue has a value to give to any of the
 checkboxes with the onmouseover event, but as soon as the mouse
 button is released it no longer has a value so the onmouseover event
 will no longer effect 

[jQuery] Re: How to remove error messages from Validation Plugin

2009-04-11 Thread Chuck Harmston
I don't recommend this, as it will stop users from submitting the form
without giving them a reason for it. Talk about a usability nightmare.
However, if you insist on it, there is a simple enough solution: just use
CSS to style the .error class:

label.error{display:none}

Chuck Harmston
http://chuckharmston.com


On Fri, Apr 10, 2009 at 10:08 PM, Rick r...@marketingease.com wrote:


 I'm using this plugin in its simplest form..
 http://docs.jquery.com/Plugins/Validation

 All I have is this for my code:

 script
 $(document).ready(function(){
$(#form).validate();
 });
 /script

 It works fine, but I'm trying to hide the error messages which it
 defaults to This field is required. The error message shows up in a
 label..

 How in the world do I hide those error messages within those labels???
 I'm sure it's easy, but I cannot find any examples anywhere!!

 Thanks to whoever helps out..



[jQuery] Re: Menu Hover and Selected

2009-04-11 Thread victorg

Guess i made a mistake again. :P

This should work now, if not i'll eat my shoe.


$('.nav a img').hover(
function(){
if($(this).attr(src).indexOf(_on) == -1) {
var newSrc = $(this).attr
(src).replace(.png,_on.png);
$(this).attr(src,newSrc);
}
},
function(){

if($(this).parent().attr(href) !=
window.location.href) {
if($(this).attr(src).indexOf
(_on.png) != -1) {
var oldSrc = $
(this).attr(src).replace(_on.png,.png);
$(this).attr
(src,oldSrc);
}
   }
}
);
var activePage = window.location.href;
$(a[href=+activePage+] img).trigger(mouseover);


[jQuery] Re: Menu Hover and Selected

2009-04-11 Thread victorg

Small correction..

var activePage = window.location.pathname.substr(1);
$(a[href=+activePage+] img).trigger(mouseover);


[jQuery] Re: jQuery Cycle -- Thumbnail Paging

2009-04-11 Thread Chuck Harmston
Hi Amy,

Do the thumbnails follow any naming convention? It wouldn't be terribly
difficult to use a callback to replace the standard Cycle pager with
thumbnails if we are easily able to determine the thumbnail URLs.

Chuck Harmston
http://chuckharmston.com

On Fri, Apr 10, 2009 at 7:24 AM, amuhlou amysch...@gmail.com wrote:


 Hi everyone,

 I'm working on an implementation of the Cycle plugin and would like to
 use thumbnails for the paging.  The tricky part is that my images are
 pulled from a php file, so I'm unsure of how to get the thumbnail
 images to load since the source images aren't loaded into the DOM all
 at once.

 My example is located at:
 http://static.spartaninternet.com/sandbox/carousel2/

 The php file looks like the following:
 img src=images/large/beach.jpg alt=beach /
 img src=images/large/beach2.jpg alt=another beach /
 img src=images/large/beachsunset.jpg alt=beach at sunset /
 img src=images/large/frogs.jpg alt=beach /
 img src=images/large/market.jpg alt=market /
 img src=images/large/monkey.jpg alt=a little monkey /
 img src=images/large/monkey2.jpg alt=a second monkey /
 img src=images/large/rooftops.jpg alt=rooftops /
 img src=images/large/volcano.jpg alt=volcano /
 img src=images/large/waterfall.jpg alt=waterfall /

 Any help would be greatly appreciated!
 ~Amy


[jQuery] Re: Endeavour: translating X-Library functionality click-n-drag checkboxes into Jquery

2009-04-11 Thread Lwangaman

Ok I tried to touch up the code a little to fix that, here's my
example:

http://jsbin.com/iyubi/edit

Now, with a single click, the value on mouseup is reversed to keep it
as it was with mousedown. But, when you do a drag, the mouseup of the
last checkbox is not canceled or reversed... I suppose it would be
enough to cancel $(this)'s mouseup, but how would you refer to $(this)
from within the $boxes.bind('mouseover')?

On 11 Apr, 16:07, Lwangaman donjohn.f...@gmail.com wrote:
 Hmm, just noticed one problem though... A single click on a checkbox
 is supposed to work too, but with this code as soon as you mouseup the
 value goes back the other way... You have to drag off in order to keep
 the value in there...

 On 11 Apr, 06:21, Ricardo ricardob...@gmail.com wrote:

  I think you already got the .dc namespacing thing, so: the mousedown
  is not being bound to the checkbox, but to the container element (the
  table, or in my example below, the UL). When you click a checkbox the
  mousedown event will bubble up to the container and fire this handler.

  As I expected my code had some flaws a few typing errors, see it fixed/
  working here:

 http://jsbin.com/edabo/edit

  I added the ability to specify a selector for the checkboxes, that way
  you can skip the ones you don't want. In case it's not provided all
  checkboxes are used by default.

  cheers,
  - ricardo

  On Apr 10, 8:17 pm, Lwangaman donjohn.f...@gmail.com wrote:

   Ok first of all thanks for taking interest!
   Then, I've tried going through your code and applying it, and I have a
   few questions:
   -- Besides the mouseover.dc that I didn't get either...
   -- I'm supposing that $boxes would be a variable where all the
   checkboxes that are applicable have been stored previously? Yet, if
   you build it as a plugin you have no way of defining which
   checkboxes are to comprised (unless this functionality is built into
   the plugin using data passed through parameters, I suppose).
   -- Then I don't quite understand what the mousedown is being bound
   to. In my example (which was not built as a plugin, but I suppose a
   plugin or defined function would be even better because it's much more
   flexible and anyone can download it and use it), the mousedown was
   being bound to all the cells that had checkboxes in them, and I was
   determining that through the class I had given them
   mychkbox (because I didn't want some of the checkboxes included,
   since they do not have an active state; the table has names,
   addresses, emails, and those that don't have an email have an inactive
   checkbox). I was also trying to follow cross-browser.com's way of
   listening to the mousedown on the cell containing the checkbox rather
   than on the checkbox itself, making the whole click-drag thing a lot
   more user-friendly.

   On 10 Apr, 20:36, jay jay.ab...@gmail.com wrote:

Just curious.. What is the difference between mouseover.dc and
mouseover?

On Apr 10, 1:44 pm, Ricardo ricardob...@gmail.com wrote:

 This (untested) is how I envision the code for that:

 $.fn.dragCheck = function(){
   //this == the current jQuery element
   return this.each(function(){

     //this == current element in the loop (table etc)
     $(this).bind('mousedown', function(e){

         //don't do anything if you didn't click a checkbox
         if ( !$(e.target).is(':checkbox') )
              return true;

         //get the clicked checkbox state
         isChecked = e.target.checked;
         //apply it to all other checkboxes on mouseover
         $boxes.bind('mouseover.dc', function(){
             this.checked = isChecked;
         });

     }).bind('mouseup', function(e){
         //cancel the mouseover action
         $boxes.unbind('mouseover.dc');
     });

 };

 $('#table1').dragCheck();

 cheers,
 - ricardo

 On 9 abr, 17:15, Lwangaman donjohn.f...@gmail.com wrote:

  Ok I resolved the cannot assign to a function result problem by
  putting the value assignment into a function(){}:

  48  $(td.mychkbox).each(
  49    function(){
  50      $(this).bind(
  51        mouseover,
  52        function(){
  53          if (gCheckedValue != null){
  54            var eccomi = this;
  55            var eccoti = $(eccomi).find(input:checkbox);
  56*           function(){$(eccoti).attr(checked) = gCheckedValue;}
  57          }
  58        });
  59      });

  Now I don't get any errors, but the event assignments don't seem to 
  be
  working together correctly...
  Basically what's supposed to happen is this:
  1 - onclick event of the checkboxes is canceled since the clicking
  and dragging is being assigned to the table cells that contain them
  2 - the table cells themselves don't actually have on onclick 
  event,
  because the value is given to the 

[jQuery] jQuery BlockUI Plugin (v2)

2009-04-11 Thread stepan

Error in line 227, symbol 17 in IE8
File http://malsup.com/jquery/block/jquery.blockUI.js?v2.16


[jQuery] Re: JQuery UI tabs and pagination

2009-04-11 Thread stepan

hi!
check the tab ID, or check currently selected tab

On 11 апр, 21:00, Claudio Poli masterk...@gmail.com wrote:
 hi everyone,
 I've this situation: an X number of tabs; in tabs content there's a
 div classed .to_be_replaced and links for paginating.
 when I click on a link it should replace the content
 of .to_be_replaced.

 The problem here is that every div.to_be_replaced gets replaced, and
 not only the one that belongs to the currently shown tab.

 this is the code:

     $('#tabcontainer').tabs({
         show: function(event, ui) {
             $('div.pagination a', ui.panel).live('click',
             function() {
                 $.blockUI({
                     message: null
                 });
                 $(ui.panel, .to_be_replaced).load(this.href);
                 return false;
             });
         }
     });

 any help is appreciated, thanks.


[jQuery] Re: jQuery plugin: Validation

2009-04-11 Thread stepan

hi
exam.

$(document).ready(function(){
$(#form).validate(
 errorPlacement: function(error, element) { }
);
});



On 11 апр, 13:54, Rick r...@marketingease.com wrote:
 I'm using this plugin in its simplest 
 form..http://docs.jquery.com/Plugins/Validation

 All I have is this for my code:

 script
 $(document).ready(function(){
         $(#form).validate();});

 /script

 It works fine, but I'm trying to hide the error messages which it
 defaults to This field is required. The error message shows up in a
 label..

 How in the world do I hide those error messages within those labels???
 I'm sure it's easy, but I cannot find any examples anywhere!!

 Thanks to whoever helps out..


[jQuery] Re: change LI class onclick of A inside

2009-04-11 Thread kevind

the code i finally used was:

$(ul.glossymenu li).click(
function(){
$(ul.glossymenu li).removeClass(current);
$(this).addClass(current);}
);

thanks for the help;

kd


On Apr 11, 9:54 am, victorg vr.gerrit...@gmail.com wrote:
 Oops, forgot the case on removeClass and addClass:

  $(ul.glossymenu li).bind(onclick,function(){
                  $(ul.glossymenu li).removeClass('current');
                  $(this).addClass('current');
          };
          );

 On Apr 11, 3:50 pm, victorg vr.gerrit...@gmail.com wrote:

  The problem is that you are selecting li items which have the class
  glossymenu (li.glossymenu).

  While you actually need :ul.glossymenu li.

  So something like this should work :)

  $(ul.glossymenu li).bind(onclick,function(){
                  $(ul.glossymenu li).removeclass('current');
                  $(this).addclass('current');
          };
          );

  On Apr 11, 3:03 pm, kevind kevint...@gmail.com wrote:

   i'm using Glossymenu at dynamic drive:

  http://www.dynamicdrive.com/style/csslibrary/item/glossy_horizontal_m...

   what i want to accomplish is when I click one of the links inside the
   LI element, the LI's in the UL lose their class of 'current' and the
   clicked LI gains the class 'current'

   i have the menu driving links to open content in an iframe so, i'm not
   going to reload the menu each time i choose a different tab - this is
   why i wish to use jquery.

   can someone correct my syntax - i can't seem to get it to work

   $(li.glossymenu).bind(onclick,function(){
                   $(li.glossymenu).removeclass('current');
                   $(this).addclass('current');
           };
           );

   thanks


[jQuery] Re: JQuery Cycle Plugin Multiple Pagers on one page

2009-04-11 Thread Skinnyl


Thanks a lot!

That's finally it... phew.

I really appreciate your help.


[jQuery] Re: Error with BlockUI: 'parentNode' is null or not an object

2009-04-11 Thread mikemad

Thanks for the replies. I found out that the problem has to do with
the fact that The BlockUi plug-in actually removes the passed in node
from the DOM. At least I know what's going on now and am able to
figure out a workaround. That's not good behavior for a plug-in.

Mike

On Apr 10, 4:14 pm, Dave Methvin dave.meth...@gmail.com wrote:
 Doesn't that mean #prg is missing from the document then? That sounds
 like a logic error in your code.


[jQuery] 'Simulating' mouseenter/mouseleave/hover events using $.live

2009-04-11 Thread Walther

I am looking for a way to simulate the actions of the hover (or
mouseenter/mouseleave) whilst using the live method of binding (The
items are dynamic).

Is there a way to do this or will I need to use the 'old fashioned'
method of unbinding and rebinding? I do not want to use a plugin.


[jQuery] IE8 will not perform Fade animation properly

2009-04-11 Thread Jared A. D. Radtke

Hello All,

I am new to this forum as well as web design (started a few months
ago).  I have been trying to implement fade effects on my site which
are not working in IE8 (naturally works fine in everything else). When
it runs, the text (set within a span that has an ID) simply disappears
rather than fade out.  I assume this is common and that there is a way
around it... does anyone care to share?

Thanks,
Jared


[jQuery] jQuery Form Validation

2009-04-11 Thread NobitaNobi79

Hi, I am new to jQuery. I follow the example on
http://docs.jquery.com/Plugins/Validation/Methods/email to add rules
to a form validator. When I modified the rules to email: true
(required: false), the script seems to stall there, no error message
nor a check. Can someone tell me if I am doing anything wrong here?
What I want is to let the validation pass if the optional fields are
valid when they are filled or they are left out empty.

I can, of course add an extra script like...
if (($(#field).val() == ) || $(#field).valid()) {
optionalValid = true;
}
But it seems very redundant considering the rules: { field: {email:
true, required: false}}, with or without the default required: false
option.

Thanks


[jQuery] JQuery UI BlockUI Plugin bug

2009-04-11 Thread wardenik

In version:
http://www.malsup.com/jquery/block/jquery.blockUI.js?v2.15

When you invoke .block() on the same element multiple times, then you
get multiple layers.
Instead it should if this element is already blocked :-)

great plugin! thanks!


[jQuery] Superfish weird behaviour

2009-04-11 Thread undercash

Hi,

I am just a joomla webmaster so my abilities are near 0..

However I d love someone to have a look at my superfish menu. It
behaves differently depending of the section of the meny

for example here at this page there is no problem

http://www.free-poker-moneys.com/online-poker-bonus/

But if you look at the section beside

http://www.free-poker-moneys.com/free-poker-money/

you can see some weird issues in the submenu section

Why isn't it working the same in all sections of the menu. I d rather
understand better if it was an overall problem but it's not.




[jQuery] Simple HTML swap question

2009-04-11 Thread Calvin

I have a simple index page with 3 links(with separate ids) and a empty
div/div tag(with an id). I am able to get content to load into the
empty div tags but I am also repeating jquery code to do so. I have
limited experience creating variables and switch/case statements and
I'm thinking that's the best way to go but can't get the code to work.

Here is the code I have so far:

  $(document).ready(function() {
$('#letter-a a').click(function(){
  $('#dictionary').load('a.html');
  return false;
  });
 });

$(document).ready(function() {
$('#letter-b a').click(function(){
  $('#dictionary').load('b.html');
  return false;
  });
 });

$(document).ready(function() {
$('#letter-c a').click(function(){
  $('#dictionary').load('c.html');
  return false;
  });
 });


[jQuery] sidebar menu

2009-04-11 Thread go_on

hi friends,

i want to know how to create a floating sidebar menu. which expands
and colapses on clicking. this side bar would open from left to right.
I have seen this many site and want to know how to do it using jquery.
kinda similar to this http://www.cssnewbie.com/example/popout-ad/ but
i wish to put in a menu( list of links)

i want the div to pop out from left-right


[jQuery] Re: Fade Pictures In and Out

2009-04-11 Thread PF

Hey everyone and thanks for all the help.  I currently have the photos
working in a UL list, but I can't figure out how to set them as the
background.  Thanks for any help.

PF wrote:
 Hi everyone.

 I asked awhile ago about fading content in and out, now I am wondering
 how to fade images in and out. The images will be in the background of
 the page (css: background-image) so I am not quite sure how I could
 integrate this.  Any help would be appreciated!


[jQuery] Validation plugin remote problem

2009-04-11 Thread Victorr

I'm using CakePHP, jQuery and the validation plugin. I'm having some
problems. I'm trying to check if a email is already in use but I can't
seem to get it too work.

I'm just trying to get a error message to see that it works but I
can't seem to get it right.

Javascript:

$(document).ready(function() {
$(#UserIndexForm).validate({
rules: {
data[User][email]: {
required: true,
email: true,
remote: /
},
data[User][passwrd]: {
required: true,
minlength: 5
},
},
messages: {
data[User][email]: {
required: Du måste ange en e-post adress.,
email: Du måste ange en giltig e-post adress.,
remote: E-post adressen du angav är upptagen.
},
data[User][passwrd]: {
required: Du måste ange ett lösenord.,
minlength: Ditt lösenord måste vara minst 5 
tecken.
}
}
});
});

And the controller:

if ($this-RequestHandler-isAjax()  !empty($_REQUEST['data']
['User']['email'])) {
$valid = 'false';
echo $valid;
}


Thanks!


[jQuery] Re: Simple HTML swap question

2009-04-11 Thread Karl Swedberg

Hi Calvin,

One way you can simplify things is to give each of those containers  
(#letters-a, #letters-b, etc.) the same class -- for example, letters.
Bind a click handler to all links within element that have  
class=letters
Then, inside the click handler, you're going to load a file based on  
the last character of the container's id. To do so, first store that  
letter in a variable:
	1. traverse up through the parent nodes until you find the element  
with the letters class

2. grab its id. (for example letters-a)
3. slice the last letter of that id (e.g. a)
When you use the load method, concatenate the variable and .html

This is what it might look like:

$(document).ready(function() {
  $('.letters a').click(function() {
var letter = $(this).parents('.letters')[0].id.slice(-1);
$('#dictionary').load(letter + '.html');
return false;
  });
});

Hope that helps.

--Karl


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




On Apr 11, 2009, at 5:46 PM, Calvin wrote:



I have a simple index page with 3 links(with separate ids) and a empty
div/div tag(with an id). I am able to get content to load into the
empty div tags but I am also repeating jquery code to do so. I have
limited experience creating variables and switch/case statements and
I'm thinking that's the best way to go but can't get the code to work.

Here is the code I have so far:

 $(document).ready(function() {
   $('#letter-a a').click(function(){
 $('#dictionary').load('a.html');
 return false;
 });
});

   $(document).ready(function() {
   $('#letter-b a').click(function(){
 $('#dictionary').load('b.html');
 return false;
 });
});

   $(document).ready(function() {
   $('#letter-c a').click(function(){
 $('#dictionary').load('c.html');
 return false;
 });
});




[jQuery] Re: Simple HTML swap question

2009-04-11 Thread Calvin Stephens

Hi Karl,

I was actually trying to build on a tutorial from your book- Learning
jQuery 1.3. The example was from Chapter 6 (the appending HTML/ AHAH
technique). Your solution will more than likeley work... I was just
trying to figure out how to make some reuseable code for all of the
links.

Your book is pretty good by the way!

Thanks for your time,

Calvin

On Sat, Apr 11, 2009 at 4:39 PM, Karl Swedberg k...@englishrules.com wrote:
 Hi Calvin,
 One way you can simplify things is to give each of those containers
 (#letters-a, #letters-b, etc.) the same class -- for example, letters.
 Bind a click handler to all links within element that have class=letters
 Then, inside the click handler, you're going to load a file based on the
 last character of the container's id. To do so, first store that letter in a
 variable:
 1. traverse up through the parent nodes until you find the element with the
 letters class
 2. grab its id. (for example letters-a)
 3. slice the last letter of that id (e.g. a)
 When you use the load method, concatenate the variable and .html
 This is what it might look like:

 $(document).ready(function() {
   $('.letters a').click(function() {
     var letter = $(this).parents('.letters')[0].id.slice(-1);
     $('#dictionary').load(letter + '.html');
     return false;
   });
 });
 Hope that helps.
 --Karl
 
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com



 On Apr 11, 2009, at 5:46 PM, Calvin wrote:

 I have a simple index page with 3 links(with separate ids) and a empty
 div/div tag(with an id). I am able to get content to load into the
 empty div tags but I am also repeating jquery code to do so. I have
 limited experience creating variables and switch/case statements and
 I'm thinking that's the best way to go but can't get the code to work.

 Here is the code I have so far:

  $(document).ready(function() {
    $('#letter-a a').click(function(){
  $('#dictionary').load('a.html');
  return false;
  });
 });

    $(document).ready(function() {
    $('#letter-b a').click(function(){
  $('#dictionary').load('b.html');
  return false;
  });
 });

    $(document).ready(function() {
    $('#letter-c a').click(function(){
  $('#dictionary').load('c.html');
  return false;
  });
 });




[jQuery] Re: Simple HTML swap question

2009-04-11 Thread Karl Swedberg
Yeah, I thought that looked familiar. ;-) Glad you like the book. Let  
me know if you need any more help with that.


--Karl


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




On Apr 11, 2009, at 7:49 PM, Calvin Stephens wrote:



Hi Karl,

I was actually trying to build on a tutorial from your book- Learning
jQuery 1.3. The example was from Chapter 6 (the appending HTML/ AHAH
technique). Your solution will more than likeley work... I was just
trying to figure out how to make some reuseable code for all of the
links.

Your book is pretty good by the way!

Thanks for your time,

Calvin

On Sat, Apr 11, 2009 at 4:39 PM, Karl Swedberg  
k...@englishrules.com wrote:

Hi Calvin,
One way you can simplify things is to give each of those containers
(#letters-a, #letters-b, etc.) the same class -- for example,  
letters.
Bind a click handler to all links within element that have  
class=letters
Then, inside the click handler, you're going to load a file based  
on the
last character of the container's id. To do so, first store that  
letter in a

variable:
1. traverse up through the parent nodes until you find the element  
with the

letters class
2. grab its id. (for example letters-a)
3. slice the last letter of that id (e.g. a)
When you use the load method, concatenate the variable and .html
This is what it might look like:

$(document).ready(function() {
  $('.letters a').click(function() {
var letter = $(this).parents('.letters')[0].id.slice(-1);
$('#dictionary').load(letter + '.html');
return false;
  });
});
Hope that helps.
--Karl

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



On Apr 11, 2009, at 5:46 PM, Calvin wrote:

I have a simple index page with 3 links(with separate ids) and a  
empty
div/div tag(with an id). I am able to get content to load into  
the

empty div tags but I am also repeating jquery code to do so. I have
limited experience creating variables and switch/case statements and
I'm thinking that's the best way to go but can't get the code to  
work.


Here is the code I have so far:

 $(document).ready(function() {
   $('#letter-a a').click(function(){
 $('#dictionary').load('a.html');
 return false;
 });
});

   $(document).ready(function() {
   $('#letter-b a').click(function(){
 $('#dictionary').load('b.html');
 return false;
 });
});

   $(document).ready(function() {
   $('#letter-c a').click(function(){
 $('#dictionary').load('c.html');
 return false;
 });
});






[jQuery] Re: IE8 will not perform Fade animation properly

2009-04-11 Thread Jordon Bedwell

How exactly are you trying to fade it? A sample of your code would be good
to diagnose said error, otherwise we have to assume that you are relying on
JQuery to fade and if you are then assume that it's the way you have your
span setup with CSS.

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Jared A. D. Radtke
Sent: Saturday, April 11, 2009 2:34 PM
To: jQuery (English)
Subject: [jQuery] IE8 will not perform Fade animation properly


Hello All,

I am new to this forum as well as web design (started a few months
ago).  I have been trying to implement fade effects on my site which
are not working in IE8 (naturally works fine in everything else). When
it runs, the text (set within a span that has an ID) simply disappears
rather than fade out.  I assume this is common and that there is a way
around it... does anyone care to share?

Thanks,
Jared



[jQuery] Re: Homemade, finder-like menu - problems with (un)hiding columns on click

2009-04-11 Thread rolfsf

I don't have an answer to your specific plugin problems, but have you
seen Nicolas Rudas' jQuery Finder plugin? : 
http://www.nicolas.rudas.info/jquery/finder/

Perhaps an answer lies in that plugin, which has similar goals to your
own



On Apr 10, 3:46 pm, Maurice Kroon flapflapf...@gmail.com wrote:
 Hi,

 First of all, I wanted to thank you guys since you always help me out
 here.

 Second, about my problem.. I'm trying to write some jquery code here,
 but I've been stuck with it for days.
 What i want to do is a sort of finder-like (on mac) menu. Goal is to
 select a category. But, categories can be very deep, so i want to add
 some animation.

 Now, so far, I've got:
 one big ul that is transformed into nice lists
 when an item is clicked, it opens up subcategories (if there are)
 and some layout changes

 but, however. As you can see if you test it out, there is some serious
 strange behavior going on..

 If you follow the path: 'follow' you'll see what i mean, as soon as
 you click somewhere else.
 The goal is that there are always a maximum of 4 columns visible. If
 there are 5 one hides. If there are 3, the fourth one shows (if there
 is any). Etc.. Now, i thought this seems pretty logical and easy, but
 I'm really, really stuck with it.

 Currently the page is at:http://bucee.xapss.com/category.html

 Thanks a lot!

 Could you help me out? Really, really thanks in advance! Maybe i could
 turn it into a plugin after, if this works it seems kinda neat i
 think.

 Thanks in advance!


[jQuery] Re: Simple HTML swap question

2009-04-11 Thread Calvin Stephens

Thanks for offering to help out more Karl! I was able to get it to work!

Cheers,

Calvin

On Sat, Apr 11, 2009 at 5:16 PM, Karl Swedberg k...@englishrules.com wrote:
 Yeah, I thought that looked familiar. ;-) Glad you like the book. Let me
 know if you need any more help with that.
 --Karl
 
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com



 On Apr 11, 2009, at 7:49 PM, Calvin Stephens wrote:

 Hi Karl,

 I was actually trying to build on a tutorial from your book- Learning
 jQuery 1.3. The example was from Chapter 6 (the appending HTML/ AHAH
 technique). Your solution will more than likeley work... I was just
 trying to figure out how to make some reuseable code for all of the
 links.

 Your book is pretty good by the way!

 Thanks for your time,

 Calvin

 On Sat, Apr 11, 2009 at 4:39 PM, Karl Swedberg k...@englishrules.com
 wrote:

 Hi Calvin,

 One way you can simplify things is to give each of those containers

 (#letters-a, #letters-b, etc.) the same class -- for example, letters.

 Bind a click handler to all links within element that have class=letters

 Then, inside the click handler, you're going to load a file based on the

 last character of the container's id. To do so, first store that letter in a

 variable:

 1. traverse up through the parent nodes until you find the element with the

 letters class

 2. grab its id. (for example letters-a)

 3. slice the last letter of that id (e.g. a)

 When you use the load method, concatenate the variable and .html

 This is what it might look like:

 $(document).ready(function() {

   $('.letters a').click(function() {

     var letter = $(this).parents('.letters')[0].id.slice(-1);

     $('#dictionary').load(letter + '.html');

     return false;

   });

 });

 Hope that helps.

 --Karl

 

 Karl Swedberg

 www.englishrules.com

 www.learningjquery.com



 On Apr 11, 2009, at 5:46 PM, Calvin wrote:

 I have a simple index page with 3 links(with separate ids) and a empty

 div/div tag(with an id). I am able to get content to load into the

 empty div tags but I am also repeating jquery code to do so. I have

 limited experience creating variables and switch/case statements and

 I'm thinking that's the best way to go but can't get the code to work.

 Here is the code I have so far:

  $(document).ready(function() {

    $('#letter-a a').click(function(){

  $('#dictionary').load('a.html');

  return false;

  });

 });

    $(document).ready(function() {

    $('#letter-b a').click(function(){

  $('#dictionary').load('b.html');

  return false;

  });

 });

    $(document).ready(function() {

    $('#letter-c a').click(function(){

  $('#dictionary').load('c.html');

  return false;

  });

 });






[jQuery] Re: JSON , PHP, MySQL, and jQuery

2009-04-11 Thread Jean

[
 {'name': 'John', 'lastName': 'Doe','age':'25', 'height': '170',
 'weight': '120'},
 {'name': 'Jane', 'lastName': 'Doe','age':'26', 'height': '175',
 'weight': '121'},
 {'name': 'Jack', 'lastName': 'Doe','age':'27', 'height': '180',
 'weight': '122'} ]

i think is

{'
 [name': 'John', 'lastName': 'Doe','age':'25', 'height': '170',
 'weight': '120'],
['name': 'Jane', 'lastName': 'Doe','age':'26', 'height': '175',
 'weight': '121'],
 ['name': 'Jack', 'lastName': 'Doe','age':'27', 'height': '180',
 'weight': '122']}

isnt?

On Wed, Apr 8, 2009 at 11:21 PM, Renato Untalan phis...@gmail.com wrote:

 I'm having trouble parsing JSON in Javascript.

 The response i'm getting from PHP when making a request is:
 [
 {'name': 'John', 'lastName': 'Doe','age':'25', 'height': '170',
 'weight': '120'},
 {'name': 'Jane', 'lastName': 'Doe','age':'26', 'height': '175',
 'weight': '121'},
 {'name': 'Jack', 'lastName': 'Doe','age':'27', 'height': '180',
 'weight': '122'} ]

 How would I go about parsing this in Javascript?  Am I not encoding it
 correctly on the PHP Side?

 Here's my JAVASCRIPT:
        $.get(includes/functions_inside.php, {function : getAppList},
                function(data, textStatus){
                        alert( data[0] );
                }
        );

 Here's my PHP:

        $AppListQuery = $insideDB-customQuery($query);
        $rows = array();
        while($r = mysql_fetch_assoc($AppListQuery)) {
            $rows[] = $r;
        }
        print json_encode($rows);

 Thanks in advance!




-- 
[]´s Jean a.k.a Suissa

Tecnólogo em Análise de Sistemas - UTF-PR
www.tudopg.com.br
www.tudocuritiba.com.br
www.tudocacascavel.com.br
www.tudofoz.com.br
www.tudopuava.com.br