[jQuery] Re: Call for contributors: A simple, fast and flexible grid/spreadsheet component.

2009-03-17 Thread Tin

More updates to the Model (DataView).

Added:
- addItem
- insertItem
- updateItem
- deleteItem

Plus a bunch of bug fixes and code cleanup.

Demo:
http://slickgrid.googlecode.com/svn/trunk/example4-model.html



[jQuery] Re: loop through div

2009-03-17 Thread ricardobeat

Oops. Didn't run the code long enough to see that, my mistake. When
this[i] is undefined the jQ object returns with document. Using eq()
instead can fix it.

jQuery.fn.showLoop = function(){
  var i = i || 0, self = this;
   this.eq(i).show(600, function(){
   self.showLoop(++i);
   });
};

but the solution Karl posted should also work and is more concise:

 var $type = $('.type'), i = 0;
 (function(){
 $type.eq(i++).show('normal', arguments.callee);
 })();

cheers,
- ricardo

On Mar 17, 12:30 am, Tom  Shafer tom.sha...@gmail.com wrote:
 doesnt seem to work get a recursion error

 thanks!
 On Mar 16, 7:26 pm, ricardobeat ricardob...@gmail.com wrote:

  jQuery.fn.showLoop = function(i){
    var i = i || 0,
      self = this;
    $( this[i] ).show(600, function(){
         self.showLoop(++i);
    });

  };

  $('.type').showLoop();

  On Mar 16, 7:27 pm, Tom  Shafer tom.sha...@gmail.com wrote:

   how can i loop through each div on a page and have them appear one by
   one
   i am trying

   var arrayList2 = $.makeArray(document.getElementsByClassName
   (.type));

                                                   
   $.each(arrayList2,function() {
                                                           $(this).show();
                                                   });

   thanks

   -tj


[jQuery] Re: jqGrid UI Theming

2009-03-17 Thread Tony

Thanks Richard
Thanks Rey,

I think that jQuery UI have a great potencial to be one of the best js
library.
Converting jqGrid to UI Theming is my little contribution

Best Regards
Tony

On Mar 17, 12:13 am, Rey Bango r...@iambright.com wrote:
 Thank you for doing this Tony. Not only are you supporting the jQuery
 project with a great grid control but you're also going through great
 lengths to ensure integration with jQuery UI. You're a great project
 supporter.

 Thanks,

 Rey
 jQuery Team

 Tony wrote:
  I'm glad to anounce the new release of jqGrid wich is fully integrated
  with UI Theming.
  This is not a final release, but I hope to finish it as soon as
  possible.
  The demo can be found here
 http://www.trirand.com/jqgrid35/jqgrid.html

  Any comments and recommendations can be posted here or
  here:http://www.trirand.com/blog

  Enjoy
  Tony


[jQuery] Re: Toggle stealing my sanity....

2009-03-17 Thread Michal Popielnicki

Thanks for the reply but frankly this does not solve the problem.

The main problem here is that the following don't work with
display:none style fixed:

jQuery(#profile-edit-avatar).toggle();

jQuery(#profile-edit-avatar).toggle(0);

However this works:

jQuery(#profile-edit-avatar).toggle(10);
jQuery(#profile-edit-avatar).toggle('fast');

And also this works with the style display:none disabled:

jQuery(#profile-edit-avatar).toggle();

That is some crazy stuff.

Please help me out on this.

Thanks in advance and best regards.


On 16 Mar, 16:55, mkmanning michaell...@gmail.com wrote:
 this won't work:
 jQuery(#profile-edit-avatar).toggle(alert('toggled!'));

 do this:
 jQuery(#profile-edit-avatar).toggle(function(){alert
 ('toggled!');});

 On Mar 16, 7:51 am, Michal Popielnicki michal.popielni...@gmail.com
 wrote:

  Hi there.

  I'm running jquery 1.3.2 and I've found rather strange behavior of
  toggle function.

  In general i have following HTML:

  div id=profile-edit-avatar class=gray round edit s-5
  div class=wrapper
  form id=profile-edit-avatar-form enctype=multipart/form-data
  method=post name=avatarForm action=/traveller/9
  input type=file id=profile-edit-avatar-form-avatarFile size=6
  name=avatarFile/br/
  span class=minorHint text/span
  /form
  /div
  !-- Rounded corners --
  div class=ne/div class=se/div class=sw/div class=nw/
  /div

  The style of id is:

  #profile-edit-avatar{ display: none;}

  Now, when I launch toggle function on that element, for example this
  way:

  jQuery(#profile-edit-avatar).toggle(alert('toggled!'));

  nothing happens (although callback is fired). Even running it from
  firebug console doesn't work. But when I disable display:none style
  in CSS inspector then toggle function works as expected.

  What the hell is going on!? This applies to Firefox browser and IE.

  The funny thing is that everything seam to work when i do:

  jQuery(#profile-edit-avatar).toggle(10);

  Can someone please explain this to me and get my sanity back.

  Thank you very much in advance.

  Best regards!


[jQuery] Re: Call for contributors: A simple, fast and flexible grid/spreadsheet component.

2009-03-17 Thread Alexandre Plennevaux

really impressive. As soon as it gets to a stable release i'll try it
out on my addressbook application.
the only thing i will miss is less semantic data (no use of a table anymore).
But i know all my users have javascript enabled. In that case, i guess
it's not such a relevant criteria anymore.

On Tue, Mar 17, 2009 at 8:20 AM, Tin michael.leib...@gmail.com wrote:

 More updates to the Model (DataView).

 Added:
 - addItem
 - insertItem
 - updateItem
 - deleteItem

 Plus a bunch of bug fixes and code cleanup.

 Demo:
 http://slickgrid.googlecode.com/svn/trunk/example4-model.html




[jQuery] Flash Inside a Tab | Why its reloading everytime?

2009-03-17 Thread Sridhar Kuppalli
Hi All,

   - I have jquery tabs, where I have a flash movie under tab1.
   - User will play the movie for a while, pause the movie.
   - Moves from tab1 = tab2 and come back to tab1.
   - The flash movie will begin from the beginning. why is it so?

Is there any solution i can solve? I have replicated the problem here
http://kuppalli.com/YUI/test.html

Thanks  Regards

Sridhar Kuppalli


[jQuery] [JQueryUI] Sortable, rebind event?

2009-03-17 Thread bart

Hi all,

I have a div which I've set a sortable to, the sortable items in the
div are images.

$(div#pics_new).sortable(
{
axis: 'x',
cursor: 'move',
opacity: 0.7, //0.01 - 1
placeholder: 'newplace',
forcePlaceholderSize: true,
update: SetOrder
});

On document.ready the div is loaded empty and the images are
dynamically being add to it. I experience the sortable __does__ work
this way, but a lot worse than how it would if the images were there
right from the start. Does this too have something to do with
rebinding events? Because the images weren't there on load?


[jQuery] Please help me

2009-03-17 Thread Nibohs

Hai
   I need jquery tutorials. plse send me files or links for jquery
tutorials

  Nibohs


[jQuery] jQuery Cycle Plugin

2009-03-17 Thread yth

Hey there.


I got a problem with the jquery cycle plugin.
I wanna use this plugin for Ajax content what I want is, 1 cycle box,
1 cycle pager, and I can change the content.
I've almost done, however, I got a problem.
I call Ajax content(first content), it succeeds
But when I change the content(load another content instead of first
content), I can see the problem in pager part.
It seems previous cycle is still alive...even I remove Ajax content.
My guess is that my functions can't kill the cycle process completely.


here are the parts of my functions,

// when Ajax finishes loading, it calls cycle plugin.
$.ajax({
url: settings.ajax.url,
success: function(xml){
},
complete: function(){attachCycleImages();}
});

// this calls cycle plugin, in here is there any problem?? :(
var attachCycleImages = function(){
$('#imgBox').after('ul id=imgCycle').cycle({
fx:'fade',
timeout:4000,
speed:1500,
pager:  '#imgCycle',
pagerAnchorBuilder: function(idx, slide) {
return 'li id=img'+idx+'a 
href=#img'+idx+'/a/li';
},
end:clearTimeout(timeout)
})
}

// this is pager, remove current box and load new content.
// #floatbox includes #imgCycle
var pagerEvent = function(target){
$(target).click(function(){
var getURL = $(target).attr(href);
$('#floatBox').fadeOut(200, function(){
$('#floatBox').remove();
pagerFlag = true;
$.floatbox({ajax:{url:getURL}});
});
return false;
});
}


does anybody have solution??
if so, how can I get it to work?


thanks for reading,
yth


[jQuery] Re: Fading issues in Internet Explorer 7 when using jQuery

2009-03-17 Thread Rostislav Hristov

In the code there is a fragment that looks like this:

var content = document.getElementById('content');
if (asual.util.Browser.isIE())
{
var _content = document.getElementById('_content');
if (_content == null)
{
var _content = content.cloneNode(false);
_content.id = '_content';
_content.style.position = 'absolute';
_content.style.top = content.offsetTop;
_content.style.left = '50%';
_content.style.width = content.offsetWidth;
_content.style.marginLeft = -content.offsetWidth/2;
document.body.appendChild(_content);
}
_content.innerHTML = xhr.responseText;
content.style.height = _content.offsetHeight;
var preloaderHeight = Math.round(_content.offsetHeight/2) + 60;
preloader.css('margin-top', preloaderHeight + 'px');
preloadImages();
}
else
{
content.innerHTML = xhr.responseText;
var preloaderHeight = Math.round(content.offsetHeight/2) + 60;
preloader.css('margin-top', preloaderHeight + 'px');
preloadImages();
}

Try removing the if statement and use only the code in the else
statement.


On Mar 17, 12:11 am, staffan.estberg staffan.estb...@gmail.com
wrote:
 Hi,

 I'm using jQuery on a site that I'm working on and everything works as it
 should - except in Internet Explorer 7 (and previous versions, but the site
 doesn't support them). Fading content on the site simply won't show up in
 this browser. Take a look athttp://dev.staffanestberg.com/fromsweden/
 either in Safari or Firefox, then in IE7 and you'll see what I mean. I'm
 currently using the built-in effect FadeTo for fading the content, but I've
 also tried creating custom effects as well as using both Show/Hide, Animate
 and FadeUp/FadeDown.
 I'm using SWFaddress on this site which might cause a conflict with jQuery,
 but wouldn't that show up in other browsers as well? What am I missing here?

 -Staffan
 --
 View this message in 
 context:http://www.nabble.com/Fading-issues-in-Internet-Explorer-7-when-using...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: validate plugin (validate elements)

2009-03-17 Thread Mac

$.validator.addMethod(div, function(value, element, param) {
var IsValid = true;
var booleanFlag;
var elements = $(param).find(:input)
.not('input[type=hidden]')
.not(:submit, :reset, :image, :button, [disabled]);
for (var i = 0; i  elements.length; i++) {
if (!this.element(elements[i])){
IsValid = false;
}
} return IsValid;
}, );

pass the id of the element to the function like this:

$(#myform).validate({
  rules: {
div: '#divtocheck'
  }
  }
});


On Mar 17, 5:36 am, led l.r@sapo.pt wrote:
 how to just validate elements in a div


[jQuery] Toggle Help

2009-03-17 Thread Ben Shelock

Im just starting out with jQuery. Im getting stuck though.

Im trying to get jQuery to manipulate my form. Changing the drop down
menus to a given value. It does the first toggle fine, but won't do
the second. Could someone explain why and provide a solution. Ive been
trying for hours.

Heres what Ive got.

script type=text/javascript
$(document).ready(function(e){
$('a.typeswitch').click(function(e) {
$('a.typeswitch').toggle(
  function () {
$(.typeselect).attr(selected,TV Shows);
  },
  function () {
$(.typeselect).attr(selected,Movies);
  }
);
});
});
/script

Thanks :)


[jQuery] jquery Validate

2009-03-17 Thread anush

Hello,

I am using the validate plugin and displaying the errors using
grouping technique. Works fine, and I get a single error message at
the end of it.

text: text1 text2 text3 text4
  },
  errorPlacement: function(error, element) {
 if (element.attr(name) == text1 || element.attr(name) ==
text2 || element.attr(name) == text3 || element.attr(name) ==
text4 )
{
error.insertAfter(#text4);

}

 else
   error.insertAfter(element);
   }

text1,text2,text3,text4 are 4 text boxes.

Now, when I go and edit a text box with error, the error message for
others disappear too. Can anybody tell me how I could go about it.



[jQuery] How to know if it is a postback?

2009-03-17 Thread Ethan

Hi,

I have a postback being called everytime a user click on the table
paging page.
This table resides in a div that being toggled (slidedown and up).
The problem i have is that, everytime the user clicks on the paging,
the table will go back to 'hide' on every clicks (this is the default
setting i set on page load).

How can i retain the state of the table on postbacks?? Please help.

Below are the codes.


$(document).ready(function() {  //1st function to
execute after DOM loads
// Your code here

//Hide all the display outputs, unless user click
individually to view them.
$(#div_photo_media).hide();   //hide the table when
the page loads

//Show upload file accordion table
$(#a_photo_media).toggle(function() {  //first function
to toggle
$(#div_photo_media).slideDown(slow);
$(#a_photo_media).html(Hide Media Photo);
return false;

}, function() { //second function to
toggle
$(#div_photo_media).slideUp(slow);
$(#a_photo_media).html(Show Media Photo);
return false;
});

});


[jQuery] Re: jqGrid UI Theming

2009-03-17 Thread W

Wow ..., it's awesome !!

Thanks for the sharing Tony ...

Warm Regards,
Wildan

On Tue, Mar 17, 2009 at 3:10 PM, Tony t...@trirand.com wrote:

 Thanks Richard
 Thanks Rey,

 I think that jQuery UI have a great potencial to be one of the best js
 library.
 Converting jqGrid to UI Theming is my little contribution

 Best Regards
 Tony


-- 
---
OpenThink Labs
www.tobethink.com

Aligning IT and Education

 021-99325243
Y! : hawking_123
Linkedln : http://www.linkedin.com/in/wildanmaulana


[jQuery] Hi my dear friend this for you

2009-03-17 Thread nehasree

Earn unlimted money at home see this site

 http://www.earnparttimejobs.com/index.php?id=200035
@


[jQuery] Re: How to disable submit button until form is fully validated

2009-03-17 Thread Mac

The validate plugin has a success option that enables customization of
the valid fields on the form
It takes a string or a function. In the validate plugin documentation
the example is used to add a class to the label, but since it's a
function, you could make it do ...anything.

eg.

$(#myform).validate({
   success: function() {
$(submitbutton).removeAttr(disabled);   },
   submitHandler: function() { alert(Submitted!) }
})

You may have to use the invalidHandler to set the button to disabled,
after it has been enabled, if the form is no longer valid.


On Mar 17, 5:02 am, D.Kreft dkr...@gmail.com wrote:
 A variant of this question pops up on occasion, but none of the
 answers I've seen thus far suit my use case. The solution usually
 involves the recommendation to do something like this:

     $(...).validate({
         ...,
         submitHandler: function() {
            // send AJAX request for calculation
         }
     });

 What I find unsatisfactory about this solution is that the user is
 still afforded the opportunity to click on a button that gets him
 nowhere. My goal here is to remove that false affordance by starting
 off with the submit button disabled and then only enabling it after
 all fields are correctly filled-out.

 Solutions I've thought of:

 1) Polling (ugh), like so:

     setInterval(function() {
         if ( $('#myForm').valid() ) {
             // enable submit button
         } else {
            // disable submit button
         }
     }, 500);

 But the problem with this is that aside from the undesirable polling,
 valid() does more than just validate the form--it validates *and*
 flags all the errors on the page, making this approach less than
 transparent.

 I also tried a similar poll using numberOfInvalids(), but
 unfortunately, an empty form returns 0 so long as there are no errors,
 which would mean that my button would *always* remain enabled.

         var checkForm = function() {
             if ( validator.checkForm() ) {
                 // disable button
             } else {
                // enable button
             }
             return true;
         };

         $('#myForm').keyup(checkForm).change(checkForm).blur
 (checkForm);

 But while this is a bit better than polling, it still leaves me with
 the undesirable side effect of displaying error messages on fields as
 soon as the user clicks on 'em.

 If checkForm() could be made public and then have it take an optional
 boolean to suppress the error messaging, that would be one way to get
 this to work...but having a simple callback option for validate()
 would be even better:

       $('#myForm').validate({
           noErrorsHandler: function(validator) {
               // yadda, yadda, yadda
           }

 Suggestions?

 -dan


[jQuery] problem with href attribute after loading content with load (IE)

2009-03-17 Thread pablo

Hi all,

I am having serious problems for getting the value of the href
attribute as it appears in the source, in IE.

I load some content with the load function and this content has links,
that are relative to the document of origin, after being loaded, the
href attribute is changed into a wrong absolute value.

The getAttribute(href, 2) still returns the absolute value, I think
this is because IE changes the value after being loaded.

Example:

http://any.com/bla1/bla2/bla3/origin.html

$(div#loader).load(another.html #something)



http://any.com/bla1/bla2/another.html

div id=something
... a href=../destiny.html/ (Points correctly to 
http://any.com/bla1/destiny.html)
/div


And after loading the content, I only am able to get, in IE, the value
http://any.com/bla1/bla2/destiny.html

Any suggestion??

Thanks in advance


[jQuery] Re: [JQueryUI] Sortable, rebind event?

2009-03-17 Thread Richard D. Worth
You may want to ask over here:

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

- Richard

On Tue, Mar 17, 2009 at 6:32 AM, bart b...@ivwd.nl wrote:


 Hi all,

 I have a div which I've set a sortable to, the sortable items in the
 div are images.

 $(div#pics_new).sortable(
 {
axis: 'x',
cursor: 'move',
opacity: 0.7, //0.01 - 1
placeholder: 'newplace',
forcePlaceholderSize: true,
update: SetOrder
 });

 On document.ready the div is loaded empty and the images are
 dynamically being add to it. I experience the sortable __does__ work
 this way, but a lot worse than how it would if the images were there
 right from the start. Does this too have something to do with
 rebinding events? Because the images weren't there on load?



[jQuery] Plugins/Validation/Validator/addMethod

2009-03-17 Thread led

I've post other 2 related with this issue.
I'm more like a newbie in javascript and jquery.

I've found this esample in the validate plugin based on form multipart
validation that i've found usefull for many situations.

Then i change the accordion structure because of ui1.7 css diferences
as the sample in the ui site (based on div),but this code give me
problems:

$.validator.addMethod(pageRequired, function(value, element) {
var $element = $(element)
function match(index) {
return current == index  $(element).parents(#sf + 
(index +
1)).length;
}
if (match(0) || match(1) || match(2)) {
return !this.optional(element);
}
return dependency-mismatch;
}, $.validator.messages.required)

it has to do with a ulli structure .

The problem is that i can't create aa accordion base on a list, just
on div like the samples in ui site.

please see this example
http://d61628.tinf28.tuganet.info/132/test2.htm

on the other and i have a structured accordion on div's and that
function dont work(validate just the elements on the page andnot all
the elements)
http://d61628.tinf28.tuganet.info/132/test1.htm

thank you , this is very important for me and i'm realy stuck on this.


[jQuery] Re: Adding images from one div to another (this is pretty simple..)

2009-03-17 Thread bart

Thanks adelf :) I've got it to work now

On Mar 13, 3:40 pm, adelf adel.f...@gmail.com wrote:
 $(div#images_all a:has(img)).click(function()
 {
  if($(this).data('added')) return false;

  $($(this).html()).appendTo(div#images_select).dblclick( function()
 { $(this).remove(); } );

  $(this).data('added', 1);

  return false;

 });

 I did not test this code, but it should work. Anyway the idea should
 be clear

 On Mar 13, 1:39 am, bart b...@ivwd.nl wrote:

  Hi all,

  I've built something with which you can click an image in one div and
  with the click add it to another. Check an example 
  on;http://www.vliegendepijl.nl/pages/test/pictest.html

  Adding an image from one div to the other works. But as an additional
  feature I'd like to also be able to remove images from the second div,
  the removal should occur on doubleclicking an image. I've tried
  something myself which doesn't work right now... I guess I figure why
  but I'm still not familiar enough with javascript/jQuery to fix it
  myself.

  Also any image can be added as many times as you like just by clicking
  it, what if I'd want a check on that? So that if the image that is
  about to be added already exists in the div it won't be added another
  time..

  Anyone who can help me with this? Thanks :)


[jQuery] Re: How to disable submit button until form is fully validated

2009-03-17 Thread RobG



On Mar 17, 5:02 am, D.Kreft dkr...@gmail.com wrote:
 A variant of this question pops up on occasion, but none of the
 answers I've seen thus far suit my use case. The solution usually
 involves the recommendation to do something like this:

     $(...).validate({
         ...,
         submitHandler: function() {
            // send AJAX request for calculation
         }
     });

 What I find unsatisfactory about this solution is that the user is
 still afforded the opportunity to click on a button that gets him
 nowhere. My goal here is to remove that false affordance by starting
 off with the submit button disabled and then only enabling it after
 all fields are correctly filled-out.

It is much more user friendly to let the user complete the form and
submit it.  Run validation onsubmit (or onblur of individual fields if
you like) and cancel submit if they don't get it right.

Do not lock users into getting a field valid before letting them
proceed to the next field.  By all means display adjacent error text
onblur, but the form only needs to be valid when it is submitted.  Its
state in the meantime is irrelevant to anyone but the user.


--
Rob


[jQuery] Re: [JQueryUI] Sortable, rebind event?

2009-03-17 Thread bart

Sorry, didn't know that. I've placed it over there :)

On Mar 17, 12:46 pm, Richard D. Worth rdwo...@gmail.com wrote:
 You may want to ask over here:

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

 - Richard

 On Tue, Mar 17, 2009 at 6:32 AM, bart b...@ivwd.nl wrote:

  Hi all,

  I have a div which I've set a sortable to, the sortable items in the
  div are images.

  $(div#pics_new).sortable(
  {
         axis: 'x',
         cursor: 'move',
         opacity: 0.7, //0.01 - 1
         placeholder: 'newplace',
         forcePlaceholderSize: true,
         update: SetOrder
  });

  On document.ready the div is loaded empty and the images are
  dynamically being add to it. I experience the sortable __does__ work
  this way, but a lot worse than how it would if the images were there
  right from the start. Does this too have something to do with
  rebinding events? Because the images weren't there on load?


[jQuery] Re: Fading issues in Internet Explorer 7 when using jQuery

2009-03-17 Thread staffan.estberg


Rotislav, it's nice to see you here :) Thank you again for helping me out!
Removing the (asual.util.Browser.isIE()) code snippet made IE7 show the
content (though I still have a problem with the on-enter site state). Was
this snippet intended only for IE6? If so I'll be happy to remove it, my
site won't support any version below 7 of IE.

-Staffan



Rostislav Hristov wrote:
 
 
 In the code there is a fragment that looks like this:
 
 var content = document.getElementById('content');
 if (asual.util.Browser.isIE())
 {
 var _content = document.getElementById('_content');
 if (_content == null)
 {
 var _content = content.cloneNode(false);
 _content.id = '_content';
 _content.style.position = 'absolute';
 _content.style.top = content.offsetTop;
 _content.style.left = '50%';
 _content.style.width = content.offsetWidth;
 _content.style.marginLeft = -content.offsetWidth/2;
 document.body.appendChild(_content);
 }
 _content.innerHTML = xhr.responseText;
 content.style.height = _content.offsetHeight;
 var preloaderHeight = Math.round(_content.offsetHeight/2) + 60;
 preloader.css('margin-top', preloaderHeight + 'px');
 preloadImages();
 }
 else
 {
 content.innerHTML = xhr.responseText;
 var preloaderHeight = Math.round(content.offsetHeight/2) + 60;
 preloader.css('margin-top', preloaderHeight + 'px');
 preloadImages();
 }
 
 Try removing the if statement and use only the code in the else
 statement.
 
 
 On Mar 17, 12:11 am, staffan.estberg staffan.estb...@gmail.com
 wrote:
 Hi,

 I'm using jQuery on a site that I'm working on and everything works as it
 should - except in Internet Explorer 7 (and previous versions, but the
 site
 doesn't support them). Fading content on the site simply won't show up in
 this browser. Take a look athttp://dev.staffanestberg.com/fromsweden/
 either in Safari or Firefox, then in IE7 and you'll see what I mean. I'm
 currently using the built-in effect FadeTo for fading the content, but
 I've
 also tried creating custom effects as well as using both Show/Hide,
 Animate
 and FadeUp/FadeDown.
 I'm using SWFaddress on this site which might cause a conflict with
 jQuery,
 but wouldn't that show up in other browsers as well? What am I missing
 here?

 -Staffan
 --
 View this message in
 context:http://www.nabble.com/Fading-issues-in-Internet-Explorer-7-when-using...
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.
 
 

-- 
View this message in context: 
http://www.nabble.com/Fading-issues-in-Internet-Explorer-7-when-using-jQuery-tp22548538s27240p22557635.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Add option to combo

2009-03-17 Thread lucas

Thanks! but, prepend put the element at begining of the list in the
combo, but it isn´t selected as the first option
in the documentation i didn´t see nothing  to put it as selected.
Thanks again!


[jQuery] IE7, rendering, script executing

2009-03-17 Thread asrij...@googlemail.com

Hi all,

I'm facing a problem with the document ready and IE7. I'm workin atm
on a jboss portal with some jsr168 portlets. My problem is, that some
of my portlets have a lot form elements (inputs, selects). If I
request the page the first thing which IE7 displays is the site
without any executed script (which is correct behaviour, because
document isn't ready :)). But that doesn't look nice for the user, he
first sees everything on the site and after a second or two some divs,
elements disappears (magic.).

FF2 and FF3 are showing page after really everything is loaded. Is
there anyway to achieve this behaviour for IE7?

I started to switch the most select boxes (which are really big) to
flexboxes (aka suggest boxes). this will reduce the site loading - I
guess.

Maybe one of you has faced such a problem and could share some of his
opinions. Any help would be appreciated.

thx for reading, regards.

asrijaal


[jQuery] Re: jQuery Cycle Plugin

2009-03-17 Thread Mike Alsup

         $('#imgBox').after('ul id=imgCycle').cycle({
                 fx:'fade',
                 timeout:4000,
                 speed:1500,
                 pager:  '#imgCycle',
                 pagerAnchorBuilder: function(idx, slide) {
                         return 'li id=img'+idx+'a 
 href=#img'+idx+'/a/li';
                 },
                 end:clearTimeout(timeout)
         })


You didn't show the code where you remove the old cycle slideshow.
Before you remove it you should 'stop' it.

$('#imgBox').cycle('stop');


[jQuery] should I create a javascript class for this project ?

2009-03-17 Thread hybris77

hi anyone and everyone, much respect to the active members on this
forum
that helped me several times learning to utilize jQuery in my work

In my current project I am asking myself if I should create a class
to handle what I want to do... here it is:

- on my page I want to be able to look at multiple objects, let's
call them
that, with dynamic content in several layers

- my idea is that the user will be able to open several of theses
objects and
to look at two of them at the same time, side by side but keeping a
number
of them closed but saved so they do not need to be called from the
database


Should I go at learning to ObjectOrient my javascriptcode at this
point?

any guidlines much appreciated

/pär


[jQuery] pagination

2009-03-17 Thread Bright Dadson
Hi Experts,


I am using jQuery/ajax to fetch result from my php file. I am trying to load
the result to for pagination like this;

 $('#hiddenresult').load(data.responseText, null, initPagination);


//Callback funtion looks like this

function pageselectCallback(page_index, jq){
var new_content = $('#hiddenresult
div.tdb:eq('+page_index+')').clone();
$('#Searchresult').empty().append(new_content);
return false;
}

/**Callback function for the AJAX content loader. */
function initPagination() {
var num_entries = $('#hiddenresult div.tdb').length;
// Create pagination element
$(#Pagination).pagination(num_entries, {
num_edge_entries: 2,
num_display_entries: 8,
callback: pageselectCallback,
items_per_page:2
});

do anyone knows why this is not working?


[jQuery] [treesize] Need prof. help with treesize menu

2009-03-17 Thread heohni

Hi, I need a treesize guru to help me setting the treesize up. I tried
so hard the last weeks, but the css issue is going to kill me... And I
need to finish this asap! So please! If there is someone arround who
is a real treesize crack! Then please email me to get this job done!
Thanks!


[jQuery] SerialScroll with scaling images and circular scrolling?

2009-03-17 Thread Kia Niskavaara


Are there any carousel plugins based on the SerialScroll plugin?

I need such a plugin that can handle a list of images and

1) all images that are not in center should be scaled down
2) the scrolling should be circular (no end)

I know that the store http://www.lafeltrinelli.it are using a plugin that is 
based on mootools. It 
can do exactly what I want. But I want to use jQuery if possible.

Any ideas?

Kia


[jQuery] Tabs dont work.

2009-03-17 Thread Spence

Hey.

I just upgraded jquery and tabs to the new version, but now the tabs
doesnt work.
I`m a newbie to jquery and cannot seam to solve it.
If someone could give me a pointer to the solvation to the problem
that would be great.

The page is: www.espensg.com/test.html


[jQuery] Simple alert inside each(function.... not working

2009-03-17 Thread Andy789

Hi All,

Here is a simple function - works fine, but I cannot get alerts for
debugging - no errors - no alerts:

function tips(){

$j('li.jqtip:visible').each(function()
{  alert('something here'); //this alert is not working !!
   $j(this).qtip({
   content: $j(this).attr('title'),
   show: { effect: 'grow', length: 400 },
   hide: { effect: 'grow', length: 400 },
   position: {
   corner: {
 target: 'topMiddle',
 tooltip: 'bottomLeft'
  }
},
   style: {
  tip: 'bottomLeft',
  name: 'dark',
  border: {
 width: 2,
 radius: 8
 //color: '#66'
  },
  width: 200
}
 });
});
}

What is wrong here? I feel it is something very obvious...


[jQuery] Re: Jörn's Tooltip plugin

2009-03-17 Thread Andy Matthews

Noone?

On Mar 16, 8:46 pm, Andy Matthews andyandja...@gmail.com wrote:
 Anyone know if Jörn Zaefferer's Tooltip plugin can be triggered from
 another event or if it's only when hovering over an element?

 For example, I could trigger the tooltip on element a FROM element b
 (or via trigger()).

 I'd like to use it as sort of a poor man's modal window message.


[jQuery] Re: Please help me

2009-03-17 Thread Karl Swedberg

This should get you started:

http://www.learningjquery.com/
http://www.jqueryfordesigners.com/
http://docs.jquery.com/Tutorials
http://net.tutsplus.com/category/tutorials/javascript-ajax/

--Karl


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




On Mar 17, 2009, at 3:30 AM, Nibohs wrote:



Hai
  I need jquery tutorials. plse send me files or links for jquery
tutorials

 Nibohs




[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread MorningZ

First, it would be wise to see what your selector returns

function tips(){
alert($j('li.jqtip:visible').length);
}

if that returns 0, then your selector is wrong

to help with that, there was this excellent post about breaking
changes in 1.3.2 release, in your case reading the :visible section
would probably be of great help

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




Andy789 wrote:
 Hi All,

 Here is a simple function - works fine, but I cannot get alerts for
 debugging - no errors - no alerts:

 function tips(){

 $j('li.jqtip:visible').each(function()
 {  alert('something here'); //this alert is not working !!
$j(this).qtip({
content: $j(this).attr('title'),
show: { effect: 'grow', length: 400 },
hide: { effect: 'grow', length: 400 },
position: {
  corner: {
  target: 'topMiddle',
  tooltip: 'bottomLeft'
   }
 },
style: {
 tip: 'bottomLeft',
 name: 'dark',
   border: {
  width: 2,
  radius: 8
  //color: '#66'
   },
   width: 200
 }
});
 });
 }

 What is wrong here? I feel it is something very obvious...


[jQuery] Re: Tabs dont work.

2009-03-17 Thread MorningZ

I'm not sure where you got your example code of how to wire up the
tabs, but you have

$(.meny).tabs()

and your HTML is:

div class=meny
  div class=lilla
ul
... links ...
/ul
  /div

/div


the selector for tabs is going to look for a UL right under the
selected item (which your HTML is not), so perhaps

$(.lilla).tabs()

would work



On Mar 17, 8:33 am, Spence espen...@gmail.com wrote:
 Hey.

 I just upgraded jquery and tabs to the new version, but now the tabs
 doesnt work.
 I`m a newbie to jquery and cannot seam to solve it.
 If someone could give me a pointer to the solvation to the problem
 that would be great.

 The page is:www.espensg.com/test.html


[jQuery] Re: Cycle's fade effect not working in IE 7 or 6

2009-03-17 Thread Madrugada

Wow. That worked like a charm. Thanks so much!


[jQuery] Flash within a Tab | Always reloads when you revisit the tab

2009-03-17 Thread Sridhar Kuppalli
Hi All,

   - I have jquery tabs, where I have a flash movie under tab1.
   - User will play the movie for a while, pause the movie.
   - Moves from tab1 = tab2 and come back to tab1.
   - The flash movie will begin from the beginning. why is it so?

Is there any solution for this?

Thanks  Regards

Sridhar K N


[jQuery] Help with jquery rounded corner

2009-03-17 Thread grafixm...@googlemail.com

Hi All,

I am a novice with web page building and JQuery and am in need of some
help. I have managed to get the Jquery rounded corners working in my
web page by adding the code  for the div and putting the Jquery bits
in my directory. However I have taken the code from the demo page and
I am having issues with the styles, they are interfering with my page
layout. I put the styling into a .css called boxs and put the java
script in the head of my index but its throwing off my featured
image?!? Can anyone help. Its posted temporarily on www.mojografix.co.uk



[jQuery] Problem with processing Form + autocomplete

2009-03-17 Thread nizzi

Hi,

Im using autocomplete plugin + form plugin + validate plugin.

The Code i use is

$(function() {
$(#movie).autocomplete(getmovie.php, {
width: 380,
selectFirst: false
});
$(#movie).result(function(event, data, formatted) {
if (data)
$(#mid).val(data[1]);
});
var v = $(#form).validate({
submitHandler: function(form) {
$(form).ajaxSubmit({
dataType:  'json',
success: function(data) {
if (data.succes){

$('#result').html(data.title+br/+data.content);
v.resetForm();
}
else{

$('#result').html(data.title+br/+data.content);
}
}
});
}
});
});
My problem is when i don't use autocomplete (which i do in another
case) all works fine.
But when i use autocomplete im not able to get the action after
success. When i check the response code it is 200 OK.
Can any one help me with this.

I face the same problem when i use TinyMCE along with form +
validation.

Thanks in advance,

Regards
Nizam


[jQuery] Make jeditable select show the option's text instead of value

2009-03-17 Thread FSan

I mean
If I have this:

{'E':'Letter E','F':'Letter F','G':'Letter G'}

and the corresponding generated select with options.

I want jeditable to display for example Letter F instead of  F
after selection.

Is it possible?

Thanks


[jQuery] Re: Help with jquery rounded corner

2009-03-17 Thread grafixm...@googlemail.com

If I can only have one ref to a .css style sheet per html page... I am
not sure how to combine this into my current one!


On Mar 17, 1:50 pm, grafixm...@googlemail.com
grafixm...@googlemail.com wrote:
 Hi All,

 I am a novice with web page building and JQuery and am in need of some
 help. I have managed to get the Jquery rounded corners working in my
 web page by adding the code  for the div and putting the Jquery bits
 in my directory. However I have taken the code from the demo page and
 I am having issues with the styles, they are interfering with my page
 layout. I put the styling into a .css called boxs and put the java
 script in the head of my index but its throwing off my featured
 image?!? Can anyone help. Its posted temporarily onwww.mojografix.co.uk


[jQuery] Re: Help with jquery rounded corner

2009-03-17 Thread grafixm...@googlemail.com

Am I making any sense?


On Mar 17, 1:50 pm, grafixm...@googlemail.com
grafixm...@googlemail.com wrote:
 Hi All,

 I am a novice with web page building and JQuery and am in need of some
 help. I have managed to get the Jquery rounded corners working in my
 web page by adding the code  for the div and putting the Jquery bits
 in my directory. However I have taken the code from the demo page and
 I am having issues with the styles, they are interfering with my page
 layout. I put the styling into a .css called boxs and put the java
 script in the head of my index but its throwing off my featured
 image?!? Can anyone help. Its posted temporarily onwww.mojografix.co.uk


[jQuery] Re: Tabs dont work.

2009-03-17 Thread Spence

Thanks for the answer, but it dont work, a get the same problem.
The thing is that it worked on the old version of jquery, and tabs.
I`m not sure where i found the example for the wireing, but it worked,
and that is the thing that pisses me off.


[jQuery] Re: Tabs dont work.

2009-03-17 Thread MorningZ

The thing is that it worked on the old version of jquery, and tabs

and the code has since changed from old to new, so just because it
worked before means nothing


On Mar 17, 10:16 am, Spence espen...@gmail.com wrote:
 Thanks for the answer, but it dont work, a get the same problem.
 The thing is that it worked on the old version of jquery, and tabs.
 I`m not sure where i found the example for the wireing, but it worked,
 and that is the thing that pisses me off.


[jQuery] jQuery BlockUI Plugin :: Demo not working in Internet Explorer

2009-03-17 Thread Visionsseo

Hi,

I have created a demo page according to the demos available on
http://malsup.com/jquery/block/#demos. The demo i have created is
working fine in Firefox but is it not running in Internet Explorer 6.
Can you please suggest, what should I do to run the demo in Internet
Explorer.

My code is as follows:

%@ Page Language=C# AutoEventWireup=true
CodeFile=PleaseWait.aspx.cs Inherits=PleaseWait %

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml;
head runat=server
titleUntitled Page/title

script src=jquery-1.3.2-vsdoc.js type=text/javascript/
script

script src=jquery-1.3.2.min.js type=text/javascript/script

script type=text/javascript src=jquery.blockUI.js?v2.12/
script

link rel=stylesheet type=text/css media=screen
href=block.css?v3 /
link rel=stylesheet type=text/css media=screen
href=jq.css /
script language=javascript type=text/javascript

$(document).ready(function() { $('#demo3').click(function() {
$.blockUI({ overlayCSS: { backgroundColor: '#00f' } });
setTimeout($.unblockUI,2000); }); });

/script

style type=text/css
#overview h2
{
border: 1px dashed gray;
padding: 10px;
background-color: #ffc;
color: black;
font-size: medium;
margin: 10px 0;
}
#footer
{
font-family: sans-serif;
color: #888;
}
#domMessage
{
padding: 10px;
}
div.blockMe
{
padding: 30px;
margin: 30px;
border: 10px solid #ccc;
background-color: #ffd;
}
#question
{
background-color: #ffc;
padding: 10px;
}
#question input
{
width: 4em;
}
#demoTable
{
border: 1px solid #ddd;
}
#demoTable tr.odd
{
background-color: #efe;
}
#demoTable th
{
padding: 15px;
background-color: #ffa;
}
#demoTable td
{
padding: 15px;
vertical-align: top;
}
#tallContent h1
{
margin: 15px;
}
/style
/head
body
form id=form1 runat=server
div
table id=demoTable
tr class=odd
td
   asp:Button Text=Run runat=server ID=demo3 /

/td
/tr
/table
/div
/form
/body
/html


Thanks,
Vivek Rathore.


[jQuery] Find element. How can I do this?

2009-03-17 Thread shapper

Hello,

I am trying to find update a plugin to create new functionality.
On the current version I have the following:

var legend = fieldset.find(':first');
var body = jQuery(document.createElement('div'));

- How can I get the first OL element inside fieldset to use it as body
instead of creating a new element (the div as it is currently?

- And can I set which element should be searched (ol, ul, div, etc)
inside the fieldset?

Thank you,
Miguel


[jQuery] Re: fonts aliasing issue with opacity overly over cycle plugin

2009-03-17 Thread kevinm

I just updated Cycle plugin and still have this odd situation

On Mar 15, 11:10 pm, kevinm sonicd...@gmail.com wrote:
 Hi

 I am having an issue in FF where I have a DIV that I am animating from
 off the screen and overlaying part of the page.

 on the page I have thecycleplugin running. If I move the mouse from
 the overlay to the where thecycleplugin is used (I initiate it on
 mouseover), the text in the overlay loses the anti-aliasing.

 I am sure this has to do with opacity and fonts, just not sure how to
 fix. thecycleplugin is using .jpg images

 This is the core overlay CSS

 #Contact {
      background: black;
      filter:alpha(opacity=85);
      -moz-opacity:0.85;
      -khtml-opacity: 0.85;
      opacity: 0.85;
      height: 1500px;
      width: 370px;
      position: absolute;
      z-index: -1;
  }

 Thanks


[jQuery] Re: jQuery BlockUI Plugin :: Demo not working in Internet Explorer

2009-03-17 Thread MorningZ

I'm sorry to point something totally unrelated out to you, but hope it
will help anyways

don't inclue *both* -vsdoc and the regular versions in your
code.


Visual studio will automatically look for a -vsdoc version of any
javascript file you include as long as it's in the same location, so
there's no need to include both





On Mar 17, 10:34 am, Visionsseo visions...@gmail.com wrote:
 Hi,

 I have created a demo page according to the demos available 
 onhttp://malsup.com/jquery/block/#demos. The demo i have created is
 working fine in Firefox but is it not running in Internet Explorer 6.
 Can you please suggest, what should I do to run the demo in Internet
 Explorer.

 My code is as follows:

 %@ Page Language=C# AutoEventWireup=true
 CodeFile=PleaseWait.aspx.cs Inherits=PleaseWait %

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
 head runat=server
     titleUntitled Page/title

     script src=jquery-1.3.2-vsdoc.js type=text/javascript/
 script

     script src=jquery-1.3.2.min.js type=text/javascript/script

     script type=text/javascript src=jquery.blockUI.js?v2.12/
 script

     link rel=stylesheet type=text/css media=screen
 href=block.css?v3 /
     link rel=stylesheet type=text/css media=screen
 href=jq.css /
     script language=javascript type=text/javascript

         $(document).ready(function() { $('#demo3').click(function() {
             $.blockUI({ overlayCSS: { backgroundColor: '#00f' } });
 setTimeout($.unblockUI,2000); }); });

     /script

     style type=text/css
         #overview h2
         {
             border: 1px dashed gray;
             padding: 10px;
             background-color: #ffc;
             color: black;
             font-size: medium;
             margin: 10px 0;
         }
         #footer
         {
             font-family: sans-serif;
             color: #888;
         }
         #domMessage
         {
             padding: 10px;
         }
         div.blockMe
         {
             padding: 30px;
             margin: 30px;
             border: 10px solid #ccc;
             background-color: #ffd;
         }
         #question
         {
             background-color: #ffc;
             padding: 10px;
         }
         #question input
         {
             width: 4em;
         }
         #demoTable
         {
             border: 1px solid #ddd;
         }
         #demoTable tr.odd
         {
             background-color: #efe;
         }
         #demoTable th
         {
             padding: 15px;
             background-color: #ffa;
         }
         #demoTable td
         {
             padding: 15px;
             vertical-align: top;
         }
         #tallContent h1
         {
             margin: 15px;
         }
     /style
 /head
 body
     form id=form1 runat=server
     div
         table id=demoTable
             tr class=odd
                 td
                    asp:Button Text=Run runat=server ID=demo3 /

                 /td
             /tr
         /table
     /div
     /form
 /body
 /html

 Thanks,
 Vivek Rathore.


[jQuery] Re: fonts aliasing issue with opacity overly over cycle plugin

2009-03-17 Thread Mike Alsup

 I just updated Cycle plugin and still have this odd situation

  I am having an issue in FF where I have a DIV that I am animating from
  off the screen and overlaying part of the page.

  on the page I have thecycleplugin running. If I move the mouse from
  the overlay to the where thecycleplugin is used (I initiate it on
  mouseover), the text in the overlay loses the anti-aliasing.

  I am sure this has to do with opacity and fonts, just not sure how to
  fix. thecycleplugin is using .jpg images


Can you post a link?


[jQuery] Look for UL

2009-03-17 Thread so.phis.ti.kat

Hello Everyone,
I tried doing a search and found some possible solutions but was not
able to get it working for my markup so I am wondering if the
following can be done and how.

Markup
ul class=pages
 li class=page
  a class=current title=Edit index href=# index/a
 /li
 li class=page
  a title=Edit menu href=# menu/a
  ul id=menu class=categories.../ul
 /li
 li class=page
  a title=Edit menu href=# catering/a
  ul id=catering class=categories.../ul
 /li
/ul

So I want to say, when you click on any li class=page/li, look
to see if that li has a child ul... thats it for now. I later want
to use the effects to show and hide the contents of that li.

jQuery
$(document).ready(function (){
 $(li.page).click(function (event) {
  if ($(this).find(ul)) {
alert(yes);
  } else {
alert(no);
  }
 });
});

Thoughts? Is there a better way or better functions to use?
I tried find and children.


[jQuery] Re: Toggle Help

2009-03-17 Thread Jsbeginner


Hello, maybe I've got this wrong but when I tested the toggle function I 
don't think I needed the .click function...


Try this :

script type=text/javascript
$(document).ready(function(e){
$('a.typeswitch').toggle(
  function () {
$(.typeselect).attr(selected,TV Shows);
  },
  function () {
$(.typeselect).attr(selected,Movies);
  }
);
});
/script



Ben Shelock a écrit :

Im just starting out with jQuery. Im getting stuck though.

Im trying to get jQuery to manipulate my form. Changing the drop down
menus to a given value. It does the first toggle fine, but won't do
the second. Could someone explain why and provide a solution. Ive been
trying for hours.

Heres what Ive got.

script type=text/javascript
$(document).ready(function(e){
$('a.typeswitch').click(function(e) {
$('a.typeswitch').toggle(
  function () {
$(.typeselect).attr(selected,TV Shows);
  },
  function () {
$(.typeselect).attr(selected,Movies);
  }
);
});
});
/script

Thanks :)

  





[jQuery] Re: Toggle Help

2009-03-17 Thread Jsbeginner


I almost forgot in my last message, don't forget the return false; if 
you don't want your link to lead anywhere ...


Something like this :

script type=text/javascript
$(document).ready(function(e){
$('a.typeswitch').toggle(
  function () {
$(.typeselect).attr(selected,TV Shows);
return false;
  },
  function () {
		$(.typeselect).attr(selected,Movies);	
		return false;

  }
);
});
/script




Ben Shelock a wrote:

Im just starting out with jQuery. Im getting stuck though.

Im trying to get jQuery to manipulate my form. Changing the drop down
menus to a given value. It does the first toggle fine, but won't do
the second. Could someone explain why and provide a solution. Ive been
trying for hours.

Heres what Ive got.

script type=text/javascript
$(document).ready(function(e){
$('a.typeswitch').click(function(e) {
$('a.typeswitch').toggle(
  function () {
$(.typeselect).attr(selected,TV Shows);
  },
  function () {
$(.typeselect).attr(selected,Movies);
  }
);
});
});
/script

Thanks :)

  





[jQuery] JQuery XML not parsing/consuming properly

2009-03-17 Thread sl

hi,

I've looked through at awfaul lot of posts/articles and haven't been
able to get this thing working. The xml and the jquery code is below.
The problem ive been getting is that despite the xml being
successfully load from the ajax call and despite the jquery loop
looping through the xml no actual values from the xml are actually
extracted from it. In Firefox you get the alert with caption in it
(and blank value) and then a series of the value alert boxes with no
value. In IE7 you get jsut the balnk caption alert and then it stops.

Thanks in advance for your help!


XML (W3C validator says its valid)

?xml version=1.0 encoding=ISO-8859-1?
grid
captionContent History/caption
head
row class=first-col
![CDATA[Content Name]]
/row
row class=
![CDATA[Date Enabled]]

/row
row class=col-thin
![CDATA[]]
/row
row class=text-bottom
![CDATA[09 02]]
/row
row
![CDATA[Payout %]]

/row
row class=col-thin
![CDATA[]]
/row
row
![CDATA[Date Removed]]
/row
/head
/grid


jQuery (jquery-1.3.2)

jQuery(document).ready(function() {
jQuery.get(http://localhost/crm/terminal-performance/grid/term-
perf2/, function(xml) {
alert('caption: ' + jQuery(xml).find('caption').text());

jQuery(xml).find('row').each(function(){
var rowValue = jQuery(this).text();
alert('value: ' + rowValue);
});
});
});


[jQuery] Re: How to drag link from another window and using the javascript in the main window to intercept the link and add customized handler?

2009-03-17 Thread Yun W

hmm, can any expert suggest a path? Thanks.

On Mar 16, 1:31 pm, Jay W yun.w...@gmail.com wrote:
 How todraglinkfrom another window and using the javascript in the
 main window to intercept thelinkand add customized handler?

 The goal is to have an event handler in the main window, then whenever
 a newlinkfrom different browser window is dragged into the main
 window, the droppedlinkwill be handled by the main window's handler
 instead of the default browser behavior --- load the linked page in
 the main window.

 Any suggestion on how to achieve this in a browser compatible way?

 Thanks.


[jQuery] Re: Look for UL

2009-03-17 Thread mkmanning

 if ($(this).find(ul)) { ...

will always return a jQuery object and so evaluate to true; you need
to check the length:

 if ($(this).find(ul).length0) { ...

On Mar 17, 8:57 am, so.phis.ti.kat see.marlon@gmail.com wrote:
 Hello Everyone,
 I tried doing a search and found some possible solutions but was not
 able to get it working for my markup so I am wondering if the
 following can be done and how.

 Markup
 ul class=pages
      li class=page
           a class=current title=Edit index href=# index/a
      /li
      li class=page
           a title=Edit menu href=# menu/a
           ul id=menu class=categories.../ul
      /li
      li class=page
           a title=Edit menu href=# catering/a
           ul id=catering class=categories.../ul
      /li
 /ul

 So I want to say, when you click on any li class=page/li, look
 to see if that li has a child ul... thats it for now. I later want
 to use the effects to show and hide the contents of that li.

 jQuery
 $(document).ready(function (){
          $(li.page).click(function (event) {
                   if ($(this).find(ul)) {
                                 alert(yes);
                   } else {
                                 alert(no);
                   }
          });

 });

 Thoughts? Is there a better way or better functions to use?
 I tried find and children.


[jQuery] Intercepting AJAX responses globally

2009-03-17 Thread [rob desbois]

Hi all,

I'm trying to write a global AJAX response handler which hooks in
*before* the client code receives requested data. The response data
from the server might be in JSON or HTML format depending on where the
request has come from.

I'm trying to build in some client-side handling in case the user's
login session ends between page load and asynchronous request. The
server-side is easy - if the request wants JSON just return
{login_required: true}, if HTML then something like span
id=login_required/span should work for the equivalent.

I have 2 issues here:
1. The global AJAX event ajaxSuccess is being generated after the
local AJAX event success. This means that I can't just prevent the
success handler from running and call the error one instead.
2. Even if I can intercept the events / response in a generic handler
before it is passed to the request-specific handler, I won't know
whether I've got HTML or JSON data.

The other option I can think of is in each response-handler function,
call e.g. 'checkResponse(data, type)' function which does the
necessary checking and returns true/false for ok/not-ok. That seems
risky though as anyone adding a feature which uses async. requests
might forget to use the check function. Obviously I can't defend
against all eventualities but this idea is a bit lacking in 'defensive
programming'.

I know this is a little vague...has anyone implemented this sort of
thing before? Cna anyone point me in the right direction for how to
implement this? I feel like I'm approaching it wrong...

TIA
--rob


[jQuery] Re: jqGrid UI Theming

2009-03-17 Thread Diego Desani

Great Job...
=)

On Mar 16, 8:57 am, Tony t...@trirand.com wrote:
 I'm glad to anounce the new release of jqGrid wich is fully integrated
 with UI Theming.
 This is not a final release, but I hope to finish it as soon as
 possible.
 The demo can be found herehttp://www.trirand.com/jqgrid35/jqgrid.html

 Any comments and recommendations can be posted here or
 here:http://www.trirand.com/blog

 Enjoy
 Tony


[jQuery] Move image on specified layer

2009-03-17 Thread Grom

Hello.

I wrote http://grom.jabbim.pl/furries/test3.html ... My mascot can
move to left and right but I dont know how to write algorithm to move
him to stand on the ground and move him up and down. Can someone check
my code and maybe wind a way ti make it? I know how to move him up and
down but his always leave a ground image :/

Help me, please.


[jQuery] Re: How to disable submit button until form is fully validated

2009-03-17 Thread D.Kreft

On Mar 16, 7:39 pm, Mac amcint...@bigmate.com.au wrote:

 The validate plugin has a success option that enables customization of
 the valid fields on the form
 It takes a string or a function. In the validate plugin documentation
 the example is used to add a class to the label, but since it's a
 function, you could make it do ...anything.

Hi Mac, thanks for your suggestion.

The problem here is that the success handler is called after an
individual input is considered valid irrespective of the status of the
other fields in the form. For example, say I have three input fields,
A, B, and C, all of which are required. Once I fill in A to the
satisfaction of the rules, the success handler is fired...even though
B and C are empty. In order to take this approach, I'd have to use the
success handler to inspect the *entire* form to see if it is ready to
be submitted. So I tried the following:

 success: function(element) {
 console.log('checkForm: %o', validator.checkForm());
 }

But the problem is that checkForm() seems to be very side-effect
ridden. Using this approach, tabbing from input A to input B causes
the This field is required error message to appear below B,
complaining to the user that an input is required before he's even had
a chance to type anything into it.

I tried for a good portion of the day yesterday to figure out what
side effect is causing this to happen, but I've been thus far
unsuccessful.

-dan


[jQuery] Re: How to disable submit button until form is fully validated

2009-03-17 Thread D.Kreft

On Mar 17, 4:53 am, RobG rg...@iinet.net.au wrote:

 It is much more user friendly to let the user complete the form and
 submit it.  Run validation onsubmit (or onblur of individual fields if
 you like) and cancel submit if they don't get it right.

 Do not lock users into getting a field valid before letting them
 proceed to the next field.  By all means display adjacent error text
 onblur, but the form only needs to be valid when it is submitted.  Its
 state in the meantime is irrelevant to anyone but the user.

To be clear, the goal here is not to lock the user down to *one field*
and forcing him to getting it right before moving on, but rather to
remove the ability to submit the form if we know that there is no hope
of succeeding due to malformed or missing inputs. Opinions may vary on
whether or not this is the right thing to do, but in this particular
case I have no choice as I am constrained by the design spec to make
this site behave in this manner--I have no say in the matter.

-dan


[jQuery] Re: [validate] How to disable submit button until form is fully validated

2009-03-17 Thread D.Kreft

On Mar 16, 12:26 pm, Stephen Sadowski d...@meta-meta.com wrote:

 How about
 $('#form input,select,radio').change(function() { /* check to see if
 necessary fields are filled out, if so enable submit */}

Hi Stephen, thanks for your suggestion.

The problem with this approach is two-fold:

1) This requires users to blur an element such as a textarea or
text input before the handler is fired, which is a bit unnatural. Most
users that I'm dealing with are not going to think Oh I need to click
or tab away before that submit button is enabled, and

2) It doesn't solve the problem of determining if the form
completely satisfies all the rules in a side effect-free manner.

The closest I've come to a solution is this:

$('form').keyup(function(e) {
if ( validator.checkForm() )
$('#submitButton').removeAttr('disabled');
});

But as I've noted in another post, calling #checkForm causes the form
to go all wacky warning of problems in input fields as soon as they
are focused, creating confusion and mayhem.

 It's pretty simple, but everything looked so complicated the ways you
 were trying.

I'd love to KISS, but desperate times call for desperate measures. I
really don't want to have to write my own validation logic, but I'm
just about to that point.

-dan


[jQuery] Re: Add option to combo

2009-03-17 Thread Paul Mills

Hi,
The prepend function just adds HTML at the beginning. You have to set
the select yourself. Simplest way would be like this:
$('select').prepend('option selected=selectedSelect ... /
option');

or something like this:
$('select').prepend('optionSelect ... /option');
$('select option:first').attr(selected,selected);

Paul

On Mar 17, 12:00 pm, lucas chizovo...@gmail.com wrote:
 Thanks! but, prepend put the element at begining of the list in the
 combo, but it isn´t selected as the first option
 in the documentation i didn´t see nothing  to put it as selected.
 Thanks again!


[jQuery] Flash within a Tab | Always reloads when you revisit the tab

2009-03-17 Thread Sridhar Gowda

Hi All,

I have jquery tabs, where I have a flash movie under tab1.
User will play the movie for a while, pause the movie.
Moves from tab1 = tab2 and come back to tab1.
The flash movie will begin from the beginning. why is it so?
Is there any solution for this?

Thanks  Regards

Sridhar K N


[jQuery] Re: questions about binding events

2009-03-17 Thread ulgold

Yes $(#dmid img, msg).each()  is looping correctly.

I have a situation where depending on the user navigation, content
that is  cached in the JavaScript object as a string is brought back
to the current document via:
$(selector).html(myObjc[index].page)

where myObjc[index].page is String containing html. So if I bind
events and after that store back in the myObj as String, all events
bound are lost and when I retrieve back into current dom ($
(selector).html(myObjc[index].page)) I have to rebind the events. So I
am assuming this is expected behavior as I can't see how events can
remain bound when that part of the DOM is stored as string in some js
object and replaced with fresh content. Correct me if I am wrong.

Actually I had to change img to imgg in this message post otherwise it
was being interpreted as html content and not being displayed in the
message.

I thought about event delegation but this would not work for me as
each event bound to each img has to store values via jquery event.data
object that are different for each image  such as image width  and
height  which is actually overlay larger image witdh and height etc.
so when user hover on thumnail image, a larege image is display
overlayed on thumbnail. Again correct me if I am wrong.


On Mar 17, 1:28 am, James james.gp@gmail.com wrote:
 1) Are you sure that $(#dmid img, msg).each() is actually looping
 through all the elements you intended to loop through? Instead of
 doing a bind, try $(this).hide() to debug it. If it's not hiding the
 elements, it's not looping correctly. If it does hide, your event
 handler is not working correctly.

 2) Is there a reason you're using imgg... ? It's suppose to be img
 But there are many advantages to using jQuery binding, such as:
 - you only code it once.
 - you separate code from markup, which keeps your page clean.
 If you have a lot of img tags, you might want to consider using Event
 Delegation. It lets you bind once to the img's parent element rather
 than X number of img tags (which is slow and more browser processer
 intensive).

 On Mar 14, 6:21 am, ulgold ulg...@gmail.com wrote:

  When I try to bind events like within ajax call:

  $.ajax({
                  type: 'POST',
  ...

                  success: function(msg) {

                       $(#dmid img, msg).each ( function() {

                       $(this).bind('mouseover', handler)
  ...

  problem is the event is not bound   unless I do something like:
  $('#firstdiv').html(msg)
  $(#dmid img).each ( function() {
          $(this).bind('mouseover', handler)

  Any idea why we cannot bind events when context is  other than the
  current loaded document?

  Another question:
  I have the option of writing onclick events  within HTML page like:

  imgg src=   onclick= return  imghandler(event); 
  imgg src=   onclick= return  imghandler(event); 
  imgg src=   onclick= return  imghandler(event); 

  or using jquery to bind the onclick events above when the document has
  loaded like

  $(imgg).each ( function() {
          $(this).bind('mouseover', imghandlerr)

  }

  Apart from the fact that the page size that is transported from the
  server to the client is reduced when using jquery binding of events
  ( due to missing hard coded onclick handlers in html), are there any
  other advantages or disadvantages of either approach?


[jQuery] $('.edlBoxArea').corners is not a function

2009-03-17 Thread boy_named_Goo

I'm trying to use the rounded corners plugin -- jquery.corners.js .

When I create a small test case, below, it works fine.  However, when
I try to add corners to my production system I receive the following
error in Firefox's error console:

$('.edlBoxArea').corners is not a function

I'm only adding two things to my production system:

FIRST:

A reference to the plugin script, in the HEAD section of my html:

script type=text/javascript src=/jscripts/jquery/
jquery.corners.js/script

SECOND:

In my onload event handler a single Javascript stmt:

$('.edlBoxArea').corners(10px);


I've also tried using the following lines of Javascript code in the
head section instead of an onload event handler.  It gives the same
error.

$(document).ready(function(){
$('.edlBoxArea').corners(10px);
});


I've verified via Firebug that the Javascript files are being loaded,
so it isn't a problem with referencing the external js files.

I'm using jQuery 1.2.6 and jQuery Corners 0.3.  I've successfully used
jQuery and other plugins (hoverIntent) successfully.  What could be
going wrong?


Here's the simple test case:

html
head
titlecorners/title
meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1 /

script type=text/javascript src=./scripts/jquery.js/script
script type=text/javascript src=./scripts/jquery.corners.js/
script

script language=JavaScript

function onLoadHandler()
{
$('.edlBoxArea').corners(10px);
}

/script

/head


body onload=onLoadHandler();

div id=outerDiv

Maybe there's some text here.br/
And a little more text here.


div class=edlBoxArea style=background-color: lightblue;

This is anbr/
inner divbr/
that should have br/
rounded corners br/
applied.

/div


div class=edlBoxArea style=background-color: tan;

This is anotherbr/
inner divbr/
that should have br/
rounded corners br/
applied.

/div

/div

/body
/html


[jQuery] Best way to Table Sort using server side calls

2009-03-17 Thread Tony K

I am looking to display a table of data and have my table headers we
links to sort.

I CANNOT use client side sorting, the table is up to 10,000 rows.

I have the table built and headers are links to pass a query param.

My question is what is the best method to pass the params and load the
page w/o a refresh.

I'd really like the header to know its a toggle, so that ordering
toggles between asc/desc.

My example is passing something like this list.cfm?
show=Allcolumn=namesort=asc

This is my first time using jQuery, so any help is appreciated.

Thanks,
Tony K


[jQuery] Re: Find element. How can I do this?

2009-03-17 Thread ricardobeat

Try this:

var body = fieldset.find('ol:first')

http://docs.jquery.com/Selectors



On Mar 17, 12:13 pm, shapper mdmo...@gmail.com wrote:
 Hello,

 I am trying to find update a plugin to create new functionality.
 On the current version I have the following:

     var legend = fieldset.find(':first');
     var body = jQuery(document.createElement('div'));

 - How can I get the first OL element inside fieldset to use it as body
 instead of creating a new element (the div as it is currently?

 - And can I set which element should be searched (ol, ul, div, etc)
 inside the fieldset?

 Thank you,
 Miguel


[jQuery] Re: Best way to Table Sort using server side calls

2009-03-17 Thread MorningZ

If you are looking to do the sorting on the server-side, then where/
how do you think jQuery comes into the equation?


On Mar 17, 1:20 pm, Tony K tony.kowal...@gmail.com wrote:
 I am looking to display a table of data and have my table headers we
 links to sort.

 I CANNOT use client side sorting, the table is up to 10,000 rows.

 I have the table built and headers are links to pass a query param.

 My question is what is the best method to pass the params and load the
 page w/o a refresh.

 I'd really like the header to know its a toggle, so that ordering
 toggles between asc/desc.

 My example is passing something like this list.cfm?
 show=Allcolumn=namesort=asc

 This is my first time using jQuery, so any help is appreciated.

 Thanks,
 Tony K


[jQuery] Re: jQuery.noConflict() and firefox 2: errors - is this a bug?

2009-03-17 Thread MorningZ

That error would *have* to mean that the jQuery library is not
properly loaded (probably the wrong path/location to the jQuery file)

Use Firebug's Net panel to confirm that it is properly found/loaded


On Mar 17, 1:05 pm, mcologne blueameri...@web.de wrote:
 hi,

 i have problems using jQuery.noConflict() and firefox 2.

 my firefox version: pc firefox 2.0.0.20
 the same with mac firefox 2.0.0.4

 i'm using only the first example 
 fromhttp://docs.jquery.com/Using_jQuery_with_Other_Libraries

 it doesn't work, the following errors occur in firebug:

 Security error code: 1000
 jQuery(document).ready is not a function

 what shall i do?
 anybody an idea if this is a bug?

 best regards m

 code i use below

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
 head
 meta http-equiv=Content-Type content=text/html; charset=utf-8 /
 titleUnbenanntes Dokument/title
 script src=http://www.prototypejs.org/javascripts/prototype.js;/
 script
    script src=../scripts/jquery/jquery-1.3.2.js/script
    script
      jQuery.noConflict();

      // Use jQuery via jQuery(...)
      jQuery(document).ready(function(){
        jQuery(div).hide();
      });

      // Use Prototype with $(...), etc.
      $('someid').hide();
    /script

 /head

 body
 /body
 /html


[jQuery] Re: Flash within a Tab | Always reloads when you revisit the tab

2009-03-17 Thread Jonathan

I'm guessing you use display:none to hide the tabs. I think that
forces the flash object to refresh.
Try a different technique to hiding your tabs and see if that helps.


On Mar 17, 10:11 am, Sridhar Gowda sridhar.kuppa...@gmail.com wrote:
 Hi All,

 I have jquery tabs, where I have a flash movie under tab1.
 User will play the movie for a while, pause the movie.
 Moves from tab1 = tab2 and come back to tab1.
 The flash movie will begin from the beginning. why is it so?
 Is there any solution for this?

 Thanks  Regards

 Sridhar K N


[jQuery] Re: Best way to Table Sort using server side calls

2009-03-17 Thread Tony K

I'd like to not have page reloads on the client side, as well as the
ability to toggle the TH with the sort direction.

Make sense?

On Mar 17, 2:05 pm, MorningZ morni...@gmail.com wrote:
 If you are looking to do the sorting on the server-side, then where/
 how do you think jQuery comes into the equation?

 On Mar 17, 1:20 pm, Tony K tony.kowal...@gmail.com wrote:

  I am looking to display a table of data and have my table headers we
  links to sort.

  I CANNOT use client side sorting, the table is up to 10,000 rows.

  I have the table built and headers are links to pass a query param.

  My question is what is the best method to pass the params and load the
  page w/o a refresh.

  I'd really like the header to know its a toggle, so that ordering
  toggles between asc/desc.

  My example is passing something like this list.cfm?
  show=Allcolumn=namesort=asc

  This is my first time using jQuery, so any help is appreciated.

  Thanks,
  Tony K


[jQuery] Re: Best way to Table Sort using server side calls

2009-03-17 Thread MorningZ

Sounds like jQuery's .load event would be best for you

make the call to list.cfm?show=Allcolumn=namesort=asc, create the
HTML table in your server side code, then put that HTML into a div
or the like


On Mar 17, 2:31 pm, Tony K tony.kowal...@gmail.com wrote:
 I'd like to not have page reloads on the client side, as well as the
 ability to toggle the TH with the sort direction.

 Make sense?

 On Mar 17, 2:05 pm, MorningZ morni...@gmail.com wrote:

  If you are looking to do the sorting on the server-side, then where/
  how do you think jQuery comes into the equation?

  On Mar 17, 1:20 pm, Tony K tony.kowal...@gmail.com wrote:

   I am looking to display a table of data and have my table headers we
   links to sort.

   I CANNOT use client side sorting, the table is up to 10,000 rows.

   I have the table built and headers are links to pass a query param.

   My question is what is the best method to pass the params and load the
   page w/o a refresh.

   I'd really like the header to know its a toggle, so that ordering
   toggles between asc/desc.

   My example is passing something like this list.cfm?
   show=Allcolumn=namesort=asc

   This is my first time using jQuery, so any help is appreciated.

   Thanks,
   Tony K


[jQuery] 1.3.2 broke fade and slide

2009-03-17 Thread andreacfm

Hi Guyes,

noone noted that 1.3.2 broke down fading and sliding.

Simple code like this:

$('.showSignIn').click(function(){
$('#passwordPanel').fadeOut(function(){
$('#signinPanel').fadeIn();
});
return false;
});

Is not working anymore. Callback fadeIn but first call do not slide
out. Same for slide up and down...

At least on FF3.

Any suggestion??

Andrea


[jQuery] Re: jQuery.noConflict() and firefox 2: errors - is this a bug?

2009-03-17 Thread mcologne

the path is correct... it works with firefox 3... and:

if i remove the prototype.js, it works with firefox 2 too...

On 17 Mrz., 19:07, MorningZ morni...@gmail.com wrote:
 That error would *have* to mean that the jQuery library is not
 properly loaded (probably the wrong path/location to the jQuery file)

 Use Firebug's Net panel to confirm that it is properly found/loaded

 On Mar 17, 1:05 pm, mcologne blueameri...@web.de wrote:

  hi,

  i have problems using jQuery.noConflict() and firefox 2.

  my firefox version: pc firefox 2.0.0.20
  the same with mac firefox 2.0.0.4

  i'm using only the first example 
  fromhttp://docs.jquery.com/Using_jQuery_with_Other_Libraries

  it doesn't work, the following errors occur in firebug:

  Security error code: 1000
  jQuery(document).ready is not a function

  what shall i do?
  anybody an idea if this is a bug?

  best regards m

  code i use below

  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  html xmlns=http://www.w3.org/1999/xhtml;
  head
  meta http-equiv=Content-Type content=text/html; charset=utf-8 /
  titleUnbenanntes Dokument/title
  script src=http://www.prototypejs.org/javascripts/prototype.js;/
  script
     script src=../scripts/jquery/jquery-1.3.2.js/script
     script
       jQuery.noConflict();

       // Use jQuery via jQuery(...)
       jQuery(document).ready(function(){
         jQuery(div).hide();
       });

       // Use Prototype with $(...), etc.
       $('someid').hide();
     /script

  /head

  body
  /body
  /html


[jQuery] Re: Best way to Table Sort using server side calls

2009-03-17 Thread Tony K

What would be the best way to Toggle the sort using jQuery?

Know of any samples that can determine if the sort is asc, then have a
toggle update the link to desc?

I appreciate all your help!

Thanks,
Tony

On Mar 17, 2:35 pm, MorningZ morni...@gmail.com wrote:
 Sounds like jQuery's .load event would be best for you

 make the call to list.cfm?show=Allcolumn=namesort=asc, create the
 HTML table in your server side code, then put that HTML into a div
 or the like

 On Mar 17, 2:31 pm, Tony K tony.kowal...@gmail.com wrote:

  I'd like to not have page reloads on the client side, as well as the
  ability to toggle the TH with the sort direction.

  Make sense?

  On Mar 17, 2:05 pm, MorningZ morni...@gmail.com wrote:

   If you are looking to do the sorting on the server-side, then where/
   how do you think jQuery comes into the equation?

   On Mar 17, 1:20 pm, Tony K tony.kowal...@gmail.com wrote:

I am looking to display a table of data and have my table headers we
links to sort.

I CANNOT use client side sorting, the table is up to 10,000 rows.

I have the table built and headers are links to pass a query param.

My question is what is the best method to pass the params and load the
page w/o a refresh.

I'd really like the header to know its a toggle, so that ordering
toggles between asc/desc.

My example is passing something like this list.cfm?
show=Allcolumn=namesort=asc

This is my first time using jQuery, so any help is appreciated.

Thanks,
Tony K


[jQuery] Re: Showing Ajax response when not empty

2009-03-17 Thread James

Don't use $.load. Use $.ajax (or $.get or $.post).

$(#userlogin, #container).everyTime(7500,function() {
 $.ajax({
  url: '/ajax/userlogin',
  type: 'POST',
  dataType: 'html',
  success: function(data) {
   if (data) {
$(this).animate(...);
   }
  }
 });
});

This assumes that your everyTime function is working. I'm not sure
what that is.

On Mar 16, 6:39 pm, Brendan bcorco...@gmail.com wrote:
 I'm not sure where to begin asking for help on this one, so I'll just
 explain what I'm trying to do.

 What I want to do is show a notification on the page when another user
 logs in.

 Say I am User A, and User B logs in, I want to see a notification that
 User B has logged in.

 Right now I have a somewhat working version of this...

         $(#userlogin, #container).everyTime(7500,function() {

                 $(this).load(/ajax/userlogin);

                 if($(this).text() != '') {

                         $(this).animate({
                                 top: 0px
                         }, 1000).animate({
                                 margin: auto
                         }, 2500).animate({
                                 top: -50px
                         }, 1000, function() { $(this).empty(); });
                 }

         });

 I am using the plugin that runs a function every specified interval...
 so right now my logic is that every 7.5 seconds, I run an ajax call to
 load in content from the ajax url... and if it is not blank, animate
 the notification.

 It sounds like it would already work, and it does sometimes... but
 sometimes i STILL get a blank notification... even though that if
 check for no content is there.

 Any ideas on how I could make this more reliable or do it better?


[jQuery] Prevent DDLB Mouse Wheel Selection

2009-03-17 Thread Shredder36

Hello,

I want to prevent our users from accidently changing the value in a
select element using the mouse wheel.  I tried various permutations on
the following theme but have been unable to get anything to work.  Any
suggestion would be greatly appreciated.  This application is for a
captive audience and does not need to be cross browser capable.  Only
IE is allowed.  Thanks,

Sam

$(document).ready(function() {

  $(my selector here).each(function(i) {

  //...some other stuff that works fine.

  $(this).bind(onmousewheel, function(e){ e.preventDefault
(); });

  });

});


[jQuery] Re: Showing Ajax response when not empty

2009-03-17 Thread James

Don't use $.load. Use $.ajax (or $.get or $.post).

$(#userlogin, #container).everyTime(7500,function() {
 $.ajax({
  url: '/ajax/userlogin',
  type: 'POST',
  dataType: 'html',
  success: function(data) {
   if (data) {
$(this).animate(...);
   }
  }
 });
});

This assumes that your everyTime function is working. I'm not sure
what that is.

On Mar 16, 6:39 pm, Brendan bcorco...@gmail.com wrote:
 I'm not sure where to begin asking for help on this one, so I'll just
 explain what I'm trying to do.

 What I want to do is show a notification on the page when another user
 logs in.

 Say I am User A, and User B logs in, I want to see a notification that
 User B has logged in.

 Right now I have a somewhat working version of this...

         $(#userlogin, #container).everyTime(7500,function() {

                 $(this).load(/ajax/userlogin);

                 if($(this).text() != '') {

                         $(this).animate({
                                 top: 0px
                         }, 1000).animate({
                                 margin: auto
                         }, 2500).animate({
                                 top: -50px
                         }, 1000, function() { $(this).empty(); });
                 }

         });

 I am using the plugin that runs a function every specified interval...
 so right now my logic is that every 7.5 seconds, I run an ajax call to
 load in content from the ajax url... and if it is not blank, animate
 the notification.

 It sounds like it would already work, and it does sometimes... but
 sometimes i STILL get a blank notification... even though that if
 check for no content is there.

 Any ideas on how I could make this more reliable or do it better?


[jQuery] Re: Showing Ajax response when not empty

2009-03-17 Thread Cam Spiers
Also in the options you should add cache: false


On Wed, Mar 18, 2009 at 8:01 AM, James james.gp@gmail.com wrote:


 Don't use $.load. Use $.ajax (or $.get or $.post).

 $(#userlogin, #container).everyTime(7500,function() {
  $.ajax({
  url: '/ajax/userlogin',
  type: 'POST',
  dataType: 'html',
  success: function(data) {
   if (data) {
$(this).animate(...);
   }
  }
 });
 });

 This assumes that your everyTime function is working. I'm not sure
 what that is.

 On Mar 16, 6:39 pm, Brendan bcorco...@gmail.com wrote:
  I'm not sure where to begin asking for help on this one, so I'll just
  explain what I'm trying to do.
 
  What I want to do is show a notification on the page when another user
  logs in.
 
  Say I am User A, and User B logs in, I want to see a notification that
  User B has logged in.
 
  Right now I have a somewhat working version of this...
 
  $(#userlogin, #container).everyTime(7500,function() {
 
  $(this).load(/ajax/userlogin);
 
  if($(this).text() != '') {
 
  $(this).animate({
  top: 0px
  }, 1000).animate({
  margin: auto
  }, 2500).animate({
  top: -50px
  }, 1000, function() { $(this).empty(); });
  }
 
  });
 
  I am using the plugin that runs a function every specified interval...
  so right now my logic is that every 7.5 seconds, I run an ajax call to
  load in content from the ajax url... and if it is not blank, animate
  the notification.
 
  It sounds like it would already work, and it does sometimes... but
  sometimes i STILL get a blank notification... even though that if
  check for no content is there.
 
  Any ideas on how I could make this more reliable or do it better?



[jQuery] Re: questions about binding events

2009-03-17 Thread James

Yes, everything you reintroduce new content into the DOM, you'll have
to re-bind the events (if you're not using Event Delegation).
Does using the $.live function work for you:

$(imgg).each(function() {
$(this).live('mouseover', imghandlerr);
});

I'm not sure I understood what you were saying in your last paragraph
regarding event delegation would not work. (Note: $.live function uses
event delegation.). Event delegation should probably work.

Assume you have this markup (imgg is img):

div id=myImgs
 imgg src=img1.jpg /
 imgg src=img2.jpg /
 imgg src=img3.jpg /
/div

You can use code like:

// mouseover any thing within #myImgs
$(#myImgs).live(mouseover, function(e) {
 // the image (or anything inside #myImgs) that was moused-over
 var $target = $(e.target);
 // check that is an img
 if ($target.get(0).tagName == 'IMG') {
// do something with $target, a jQuery object of the image
 }
});

Something like that. You only need to bind once on page ready
regardless of how many images you have and regardless of whether
you're reintroducing new images into the DOM.




On Mar 17, 7:43 am, ulgold ulg...@gmail.com wrote:
 Yes $(#dmid img, msg).each()  is looping correctly.

 I have a situation where depending on the user navigation, content
 that is  cached in the JavaScript object as a string is brought back
 to the current document via:
 $(selector).html(myObjc[index].page)

 where myObjc[index].page is String containing html. So if I bind
 events and after that store back in the myObj as String, all events
 bound are lost and when I retrieve back into current dom ($
 (selector).html(myObjc[index].page)) I have to rebind the events. So I
 am assuming this is expected behavior as I can't see how events can
 remain bound when that part of the DOM is stored as string in some js
 object and replaced with fresh content. Correct me if I am wrong.

 Actually I had to change img to imgg in this message post otherwise it
 was being interpreted as html content and not being displayed in the
 message.

 I thought about event delegation but this would not work for me as
 each event bound to each img has to store values via jquery event.data
 object that are different for each image  such as image width  and
 height  which is actually overlay larger image witdh and height etc.
 so when user hover on thumnail image, a larege image is display
 overlayed on thumbnail. Again correct me if I am wrong.

 On Mar 17, 1:28 am, James james.gp@gmail.com wrote:

  1) Are you sure that $(#dmid img, msg).each() is actually looping
  through all the elements you intended to loop through? Instead of
  doing a bind, try $(this).hide() to debug it. If it's not hiding the
  elements, it's not looping correctly. If it does hide, your event
  handler is not working correctly.

  2) Is there a reason you're using imgg... ? It's suppose to be img
  But there are many advantages to using jQuery binding, such as:
  - you only code it once.
  - you separate code from markup, which keeps your page clean.
  If you have a lot of img tags, you might want to consider using Event
  Delegation. It lets you bind once to the img's parent element rather
  than X number of img tags (which is slow and more browser processer
  intensive).

  On Mar 14, 6:21 am, ulgold ulg...@gmail.com wrote:

   When I try to bind events like within ajax call:

   $.ajax({
                   type: 'POST',
   ...

                   success: function(msg) {

                        $(#dmid img, msg).each ( function() {

                        $(this).bind('mouseover', handler)
   ...

   problem is the event is not bound   unless I do something like:
   $('#firstdiv').html(msg)
   $(#dmid img).each ( function() {
           $(this).bind('mouseover', handler)

   Any idea why we cannot bind events when context is  other than the
   current loaded document?

   Another question:
   I have the option of writing onclick events  within HTML page like:

   imgg src=   onclick= return  imghandler(event); 
   imgg src=   onclick= return  imghandler(event); 
   imgg src=   onclick= return  imghandler(event); 

   or using jquery to bind the onclick events above when the document has
   loaded like

   $(imgg).each ( function() {
           $(this).bind('mouseover', imghandlerr)

   }

   Apart from the fact that the page size that is transported from the
   server to the client is reduced when using jquery binding of events
   ( due to missing hard coded onclick handlers in html), are there any
   other advantages or disadvantages of either approach?




[jQuery] AJAX Error Handling using ajaxSetup

2009-03-17 Thread cfdvlpr

Has anyone used ajaxSetup to log or report AJAX errors?  Would you
care to share how you did this?


[jQuery] Re: Prevent DDLB Mouse Wheel Selection

2009-03-17 Thread Shredder36

Ok, i found the mousewheel plugin and it solved my problem.
Nevermind...

Sam

  $(this).mousewheel(function(){return false;});


On Mar 17, 2:19 pm, Shredder36 shredde...@gmail.com wrote:
 Hello,

 I want to prevent our users from accidently changing the value in a
 select element using the mouse wheel.  I tried various permutations on
 the following theme but have been unable to get anything to work.  Any
 suggestion would be greatly appreciated.  This application is for a
 captive audience and does not need to be cross browser capable.  Only
 IE is allowed.  Thanks,

 Sam

 $(document).ready(function() {

   $(my selector here).each(function(i) {

       //...some other stuff that works fine.

       $(this).bind(onmousewheel, function(e){ e.preventDefault
 (); });

   });



 });- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread Andy789

Yes, this is what i was doing, but puzzled as why the second alert
never triggers:

function tips(){
alert($j('li.jqtip:visible').length); //returns 9
$j('li.jqtip:visible').each(function()
{  alert('something here'); //returns nothing, but the function is
working and creates tooltips !!
   $j(this).qtip({ ..

How is that possible?

On Mar 18, 12:28 am, MorningZ morni...@gmail.com wrote:
 First, it would be wise to see what your selector returns

 functiontips(){
     alert($j('li.jqtip:visible').length);

 }

 if that returns 0, then your selector is wrong

 to help with that, there was this excellent post about breaking
 changes in 1.3.2 release, in your case reading the :visible section
 would probably be of great help

 http://www.learningjquery.com/2009/03/3-quick-steps-for-a-painless-up...

 Andy789 wrote:
  Hi All,

  Here is a simplefunction- works fine, but I cannot get alerts for
  debugging - no errors - no alerts:

 functiontips(){

  $j('li.jqtip:visible').each(function()
  {  alert('something here'); //this alert is not working !!
     $j(this).qtip({
     content: $j(this).attr('title'),
     show: { effect: 'grow', length: 400 },
     hide: { effect: 'grow', length: 400 },
     position: {
                corner: {
           target: 'topMiddle',
           tooltip: 'bottomLeft'
        }
  },
     style: {
       tip: 'bottomLeft',
       name: 'dark',
        border: {
           width: 2,
           radius: 8
           //color: '#66'
        },
        width: 200
  }
                              });
  });
  }

  What is wrong here? I feel it is something very obvious...


[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread James

What happens if you remove the code for the qtip and leave the alert?

On Mar 17, 10:14 am, Andy789 e...@abcstudio.com.au wrote:
 Yes, this is what i was doing, but puzzled as why the second alert
 never triggers:

 function tips(){
 alert($j('li.jqtip:visible').length); //returns 9
 $j('li.jqtip:visible').each(function()
 {  alert('something here'); //returns nothing, but the function is
 working and creates tooltips !!
    $j(this).qtip({ ..

 How is that possible?

 On Mar 18, 12:28 am, MorningZ morni...@gmail.com wrote:

  First, it would be wise to see what your selector returns

  functiontips(){
      alert($j('li.jqtip:visible').length);

  }

  if that returns 0, then your selector is wrong

  to help with that, there was this excellent post about breaking
  changes in 1.3.2 release, in your case reading the :visible section
  would probably be of great help

 http://www.learningjquery.com/2009/03/3-quick-steps-for-a-painless-up...

  Andy789 wrote:
   Hi All,

   Here is a simplefunction- works fine, but I cannot get alerts for
   debugging - no errors - no alerts:

  functiontips(){

   $j('li.jqtip:visible').each(function()
   {  alert('something here'); //this alert is not working !!
      $j(this).qtip({
      content: $j(this).attr('title'),
      show: { effect: 'grow', length: 400 },
      hide: { effect: 'grow', length: 400 },
      position: {
                 corner: {
            target: 'topMiddle',
            tooltip: 'bottomLeft'
         }
   },
      style: {
        tip: 'bottomLeft',
        name: 'dark',
         border: {
            width: 2,
            radius: 8
            //color: '#66'
         },
         width: 200
   }
                               });
   });
   }

   What is wrong here? I feel it is something very obvious...




[jQuery] jQuery Selector Help

2009-03-17 Thread side1021

Hi,

Can some1 please explain this in detail to me?  I am confused on the
selector part $('li id=_img'+index+'/li').

// add list to ul
var list = $('li id=_img'+index+'/li').attr
('class',_imageLoadClassName).appendTo('ul#'+_imgContainerId);


Thanks!





[jQuery] jquery animation

2009-03-17 Thread Trend-King

hi there i have a problem with the jquery animation

i have a markup like this
div  id=tha_text style=height:80px;text text/div
div id=tha_img style=margin-top-80px;img src=somesrc
height=80 //div

so i want to $('#tha_img').hide(slow) on mouseenter of the img and
the text with is on the bottom appears, ok but now i want the jquery
to abourt the animation if the hide of the tha_img isn't finished and
the mouse goes out the tha_img to show the tha_img but dont do this if
mouseenter tha_text oder show the tha_img if mouseleave tha_text.

oh a little bit confused writing.

how can i do this?


any ideas i am thankfull for any help


[jQuery] jquery on iphone - why does this scroll to the top?

2009-03-17 Thread pedalpete

I've been working on an iphone version of my site, and though their
are lots of comments re: animation on mobile safari, I actually don't
think it's all that bad (maybe it was previous versions, I'm on v.2).

I have an iphone like UI working fairly well, where the user can
select something and the screen shifts left, and then shows the
selection.
Back and forth work ok, except that for some reason before it goes
shifts left, it scrolls to the top of the screen.

I'm not sure why this is happening.
 a demo is at http://zifimusic.com/v2/mobile

what the code does is
1) animate the list left -330px (off the screen)
2) add the appropriate content to a div (which was offscreen is now
onscreen) called div#selectedshow
3) scroll to the top of div#selectedShow so that the selected item is
always at the top of the screen
4) click the x (it will be a back button eventually) to reverse this
process

the code is
[code]
 $('div#holdForecast').animate({marginLeft : -330px},1000)
var getShowid=$(this).attr('id');
var selectedShow=$(this).html();
var htmlThis = 'li class=show'+selectedShow+'span
class=holdMap/span\/li';
$('div#selectedShow').html(htmlThis).show().css
({position:absolute, top: topVal});
$('div#selectedShow li.show').addClass
('selectedShow').removeClass('show');
var targetOffset=$('li.selectedShow').offset().top;
targetOffset=targetOffset-14;
$('html,body').animate({scrollTop: targetOffset},5);
var topMenu='div id=topmenua class=back?php echo
$closeImg; ?\/a\/div';
$('li.selectedShow').prepend(topMenu);
[/code]

I don't see anything in there that says (scroll to the top), and yet
it seems to do that.
Is there a better animation sequence I should be using?
Should I chain these better than I have?

Thanks
Pete


[jQuery] Re: Find element. How can I do this?

2009-03-17 Thread shapper

Yes,

I tried that before but it did not work this is why I asked.

I placed an example online:
http://www.27lamps.com/Beta/Collapse/Form.html

You can see that each form's fieldset has an ordered list inside.
I want to show/hide the OL instead of adding it to a new div.

Could someone, please, help me with this?

Thanks,
Miguel

On Mar 17, 6:01 pm, ricardobeat ricardob...@gmail.com wrote:
 Try this:

 var body = fieldset.find('ol:first')

 http://docs.jquery.com/Selectors

 On Mar 17, 12:13 pm, shapper mdmo...@gmail.com wrote:

  Hello,

  I am trying to find update a plugin to create new functionality.
  On the current version I have the following:

      var legend = fieldset.find(':first');
      var body = jQuery(document.createElement('div'));

  - How can I get the first OL element inside fieldset to use it as body
  instead of creating a new element (the div as it is currently?

  - And can I set which element should be searched (ol, ul, div, etc)
  inside the fieldset?

  Thank you,
  Miguel


[jQuery] where to load init function with google?

2009-03-17 Thread Milan Andric

Hello, I was just adding a dropdown menu to my site using droppy.

http://plugins.jquery.com/project/droppy

And I also use google jdev with google.load('jquery',...).

Droppy requires a bit of code to initialize the dropdown:

$(document).ready(function() {
  $('#nav').droppy();
});

Now where should that code go when I'm using google.load() ... this is
the solution I came up with:

...
script language=Javascript type=text/javascript
google.load(jquery, 1.3.1);
/script
script src=/media/js/jquery.droppy.js type=text/javascript/
script
script language=Javascript type=text/javascript
$(document).ready(function() {
  $('#nav').droppy();
});
/script
...

Is this perfectly normal?  Seems like since I'm doing google.load() I
should have a callback or something.

Just wondering ... thanks!

--
Milan


[jQuery] Re: partial step form validate

2009-03-17 Thread tres

Actually, to select all the elements in a specific form, all you need
is:

$('#your-form :input');

-Trey



On Mar 17, 12:43 pm, Led l.r@sapo.pt wrote:
 See it here

 http://d61628.tinf28.tuganet.info/132/1.htm

 On 17 Mar, 01:30, Stephen Sadowski d...@meta-meta.com wrote:

  Hey,

  I'd go with $('#form input,select,radio,textarea') to select all
  standard form elements, but the validation depends on how you're doing
  validation.

  -S

  On Mon, 2009-03-16 at 18:18 -0700, led wrote:
   Hi need to validate just the form elements in a step. how do i
   reference the form elements in a div.

   ex: $(#form).validate().element(elements in the div)

   thanks in advanve- Ocultar texto citado -

  - Mostrar texto citado -


[jQuery] Re: partial step form validate

2009-03-17 Thread tres

Actually, if it's input elements within a step:

$('#the-step-parent-element :input');

-Trey



On Mar 18, 8:56 am, tres treshug...@gmail.com wrote:
 Actually, to select all the elements in a specific form, all you need
 is:

 $('#your-form :input');

 -Trey

 On Mar 17, 12:43 pm, Led l.r@sapo.pt wrote:

  See it here

 http://d61628.tinf28.tuganet.info/132/1.htm

  On 17 Mar, 01:30, Stephen Sadowski d...@meta-meta.com wrote:

   Hey,

   I'd go with $('#form input,select,radio,textarea') to select all
   standard form elements, but the validation depends on how you're doing
   validation.

   -S

   On Mon, 2009-03-16 at 18:18 -0700, led wrote:
Hi need to validate just the form elements in a step. how do i
reference the form elements in a div.

ex: $(#form).validate().element(elements in the div)

thanks in advanve- Ocultar texto citado -

   - Mostrar texto citado -


[jQuery] Re: Flash within a Tab | Always reloads when you revisit the tab

2009-03-17 Thread Aaron Barker

If you are referring to Firefox there is this bug that I submitted
years ago that hasn't been looked at yet
https://bugzilla.mozilla.org/show_bug.cgi?id=262354

On Mar 17, 7:48 am, Sridhar Kuppalli sridhar.kuppa...@gmail.com
wrote:
 Hi All,

    - I have jquery tabs, where I have a flash movie under tab1.
    - User will play the movie for a while, pause the movie.
    - Moves from tab1 = tab2 and come back to tab1.
    - The flash movie will begin from the beginning. why is it so?

 Is there any solution for this?

 Thanks  Regards

 Sridhar K N


[jQuery] Display bug in superfish on Chrome

2009-03-17 Thread cletus

I use superfish for a site I'm developing.  The drop shadows have a
nasty white display artifact and seem to leave other visual artifacts
on the page.  I've seen chatter that this may relate to how Chrome
treats opacity.  Whatever the case, it's not pretty.

Cheers


[jQuery] Reload only affected record

2009-03-17 Thread Thiago

I add, edit, read and delete records via ajax.
Is working correctly.
Only it is not optimized, every time I do some action script reads all
my records again.
I wish only the record that action has to be recharged.


Can you help?


[jQuery] Cycle Plugin Pager with Images

2009-03-17 Thread jethom2


I'm having a problem with this code: 

function fade() {$('.pic').fadeIn(7000);}
$('#shuffle')
.before('ul id=nav')
.cycle({
before: fade,
fx: 'shuffle',
timeout: 1,
shuffle: {
left: 457},
pager:  '#nav', 
pagerAnchorBuilder: function(idx, slide) {
return 'li #  ' + slide.src + '  /li'; }
})
;

particularly the part where it calls back in the slide.src . I want to
have it call back a different part of the slide area. Also I'm not sure what
part I want to call. What i have for the whole image set that rotates is
this: 

div id=shuffle
 /galleries/25threunion/index.shtml div class=polaroid
 /graphics/rotation/galleries/25threunion.jpg 
/div 
 /galleries/commweek/index.shtml div class=polaroid
 /graphics/rotation/galleries/commweek.jpg  
/div 
 /galleries/gorilla/index.shtml div class=polaroid
 /graphics/rotation/galleries/gorilla.jpg  
/div 
/div

ul id=nav/ul 

The srcs for the images I want to pull in are in the middle. 

Thanks for any help.
-- 
View this message in context: 
http://www.nabble.com/Cycle-Plugin-Pager-with-Images-tp22560095s27240p22560095.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Newbie: Convert onload scripts to plugin

2009-03-17 Thread simusch

Hi there

please excuse my non-perfect english, i'm german speaking ;)

i am new to jQuery (and to this group) and have a problem:

i created a small website with a main- and a submenu. these are text-
links.
when i click on a main-menu-item, there are the following actions
executed:

- empty mainmenu-container
- load mainmenu to get the right item marked as active (post-request)
- empty submenu-container
- load submenu (post-request)
- change the color of some items of the site
- empty content-container
- load matching content (post-request)

now is my problem, that after doing all these things, the menu doesn't
work anymore, because the jquery script is defined only on ready()

how can i transform this actions to a plugin (would be the best way,
isn't it?) which i can use on clicking the menu-item?

here is my script:

HTML:
=

div id=mainMenuContainer
div class=mainMenuText id=mainMenu_home
a class=menu active href=?id=1 name=1home/a
/div
div class=mainMenuText id=mainMenu_training
a href=?id=2 class=menu name=2something/a
/div
div class=mainMenuText id=mainMenu_kunden
a href=?id=3 class=menu name=3something/a
/div
div class=mainMenuText id=mainMenu_profil
a href=?id=4 class=menu name=4something/a
/div
div class=mainMenuText id=mainMenu_kontakte
a href=?id=5 class=menu name=5something/a
/div
/div



jQUERY:
===

$(document).ready(function()
{
// click mainMenu
$(.mainMenuText a).click(function(event){
event.preventDefault();
var mainMenuId = $(this).attr(name);

//show mainMenu
//empty first
$(#mainMenuContainer).html();

//send request to php (getmainMenu)
$.post(interface/requests/getMainMenuText.php, {id:
mainMenuId}, function(data) {
$(#mainMenuContainer).html(data);
});

//show subMenu
//empty first
$(#subMenuContainer).html();

//send request to php (getSubMenu)
$.post(interface/requests/getSubMenuText.php, {id:
mainMenuId}, function(data) {
$(#subMenuContainer).html(data);
});

//change color and corner
$.post(interface/requests/getColor.php, {id:
mainMenuId}, function(data) {
$(.line).css(background-color, data);
$(#cornerTopRight).css(background-image, url
('interface/images/corner/+mainMenuId+.jpg'));
$(.droppable-hover).css(border, 1px solid
+data);

$(.menu:hover).css(color, data);
$(.active).css(color, data);
});

//show shortContent
$(#fullContent).hide(1);
$(#toggleDiv).show('slow');

//send request to php (get content)
$.post(interface/requests/getContent.php, {id:
mainMenuId}, function(xml) {
$(#shortContentText).html($(shortText, xml).text
());
$(#fullContentText).html($(fullText, xml).text());
});
});
});


thanks for your help!

simon from switzerland


[jQuery] Ajax - Reload only affected record

2009-03-17 Thread Thiago

I add, edit, read and delete records via ajax.
Is working correctly.
Only it is not optimized, every time I do some action script reads all
my records again.
I wish only the record that action has to be recharged.


Can you help?


[jQuery] Re: $('.edlBoxArea').corners is not a function

2009-03-17 Thread Mike Alsup

 I'm trying to use the rounded corners plugin -- jquery.corners.js .

 When I create a small test case, below, it works fine.  However, when
 I try to add corners to my production system I receive the following
 error in Firefox's error console:

 $('.edlBoxArea').corners is not a function



Which corner plugin are you using?


  1   2   >