[jQuery] Re: javascript loaded via ajax

2010-01-13 Thread Ami
Yes. Two options. 1. to remove function from the DOM: window.functionname=null; 2. To create "one-time" functions, like: (function (){ function a() {alert('a')} function b() {alert('b')} function c() {a();b();} })(); the function a,b,c are relase after they run. OR (function (){ a=function() {al

[jQuery] Re: Read ajax response headers?

2010-01-13 Thread Ami
try to change the paramater name inside the success function, to something like "xhr", for example: ... success:function (data,xhr) {} complele:function (xhr) {} .. You uses XMLHttpRequest. Maybe the browser think about the native object. On Jan 13, 9:16 pm, bryan wrote: > Read ajax response hea

[jQuery] Re: Change "this" when binding element

2009-12-27 Thread Ami
I get an answer from John: http://groups.google.com/group/jquery-dev/msg/9345d498c4a1d5f5 On Dec 23, 5:05 pm, Ami wrote: > One solution is to use the data property like: > > function myObj() > { > document.bind('scroll',this,this.myScroll); >

[jQuery] Re: [AUTOCOMPLETE]

2009-12-27 Thread Ami
Yes. try that: $('select').focus( function (){$(this).attr('size',5)} ).blur( function (){$(this).attr('size',0)} ) If it.. rate me please. On Dec 23, 9:47 pm, Jake Moon wrote: > Is it possible to open the select list on focus? > > Best regards, > > Jake Moon

[jQuery] Re: Function call

2009-12-27 Thread Ami
function slide() { if ($(slide_img).attr("src")!="images/1.jpg"){ $(slide_img).fadeOut(200,function() { $(slide_img).attr({src:"images/1.jpg"}); $(slide_img).fadeIn(200); });} } OR use can use "this" like: functio

[jQuery] Re: The form is not submitted onKeyDown

2009-12-27 Thread Ami
Try that: $(document).keydown (function (e) { if (e.ctrlKey && e.which==13) { $('#myform').trigger('submit') }) Let me know if it's work. On Dec 27, 6:59 pm, Andre Polykanine wrote: > Hello everyone, > > I'm trying to sumbit the form normally as well as by pressing > Ctrl+Enter. Yepp, the same ta

[jQuery] Re: I would like to get value each time when one of these checkboxes will change status, how can I do that ?

2009-12-27 Thread Ami
I recommend to use "change" event and not "click" event, becuase users can change the checkbox without clicking (by using the keyboard). On Dec 28, 1:17 am, Charlie Griefer wrote: > You just want the value of the one that's checked? > > $(':checkbox[name=number]').click(function() { >      if ($(

[jQuery] Re: Finding next element

2009-12-27 Thread Ami
$('.active').prev() $('.active').next() Rate me please if I helped. On Dec 28, 2:30 am, Toaster wrote: > Hello. > > Example: > > >       >       >       > > > How would I be able to get find the next or previous in relation > to the ? > > I'd appreciate it if anybody could help me out with

[jQuery] Re: Change "this" when binding element

2009-12-23 Thread Ami
c 23, 5:03 pm, Ami wrote: > I am suggestion for new small feaute in jQuery. > add a new proeprty to "bind" function. a Scope property. > > sometimes I am binding a function inside object. So I need a solution > to change the scope of this function. > something like: &

[jQuery] Change "this" when binding element

2009-12-23 Thread Ami
I am suggestion for new small feaute in jQuery. add a new proeprty to "bind" function. a Scope property. sometimes I am binding a function inside object. So I need a solution to change the scope of this function. something like: $().bind('click',data,scope,function) For Examp

[jQuery] Get the element that I bind to live()

2009-09-01 Thread Ami
This is my Html: I am trying to get the element that I binded to live(), but always i am getting it's children. For example, this is my code: Hye Hello Hello World $('.theClass').live('click', function () { alert('I am trying to get the parent div id' + this.id + ', but i am always get the

[jQuery] Re: parent load question

2009-03-01 Thread Ami
If it's not on the same domain you must use JSONP. On Mar 2, 7:27 am, mkmanning wrote: > I'll go ahead and ask this here as well: is 'http://test.com/ > remote.html' in the same domain? > > On Mar 1, 8:55 pm, Ami wrote: > > &g

[jQuery] Re: Slideshow Using Ajax

2009-03-01 Thread Ami
There is no way to load images in AJAX. AJAX is only for text (Like JS/ CSS/JSON/XML,...) You can use AJAX to load the image source, and put it in , or On Mar 2, 5:53 am, Nic Hubbard wrote: > I have been searching for a jQuery slideshow plugin that can load in > images using ajax.  But I am hav

[jQuery] Re: parent load question

2009-03-01 Thread Ami
Try to put between and #myelemnt   Aminadav On Mar 2, 4:15 am, joshm wrote: > Can someone explain how to do this, I'm trying to load the parent of > an element (which will be a cell) and then load the with the > html from a remote file kind of like so: > > var parent = $('#myelement').par

[jQuery] Re: multiple conditions?

2009-03-01 Thread Ami
var divFocus=false,textareaFocus=false $('div').focus(function () {divFocus=true}).blur(function() {divFocus=false;doSomething()}; $('textarea').focus(function () {textareafocus=true}).blur(function() {textareaFocus=false;doSomething()} function doSomthing() { if (!divFocus && !textAreaFocus) ale

[jQuery] Suggestion code: Toggle not only to click

2009-02-25 Thread Ami
Hello. Some times we need to make toggle not only to click events. So I change the jQuery Code at line 2993-2954 to: toggle: function( fn ) { // Save reference to arguments for access in closure var args = arguments, i = 1; //I added This

[jQuery] Re: Suggestion: .unbind('.eventname")

2009-02-25 Thread Ami
e + (types || "") ); Thank you On Feb 26, 5:19 am, Ami wrote: > Suggestion:  .unbind('.event-title") > > $('div').bind('click.mybind',func1).bind('focus.mybind',func2).bind > ('click",func3) > > Now I am trying to un

[jQuery] Suggestion: .unbind('.eventname")

2009-02-25 Thread Ami
Suggestion: .unbind('.event-title") $('div').bind('click.mybind',func1).bind('focus.mybind',func2).bind ('click",func3) Now I am trying to unbind func1& func2 like: $('div').unbind('click.mybind').unbind('focus.mybind'); My suggestion is that jQuery will support this: $('div').unbind('.mybind

[jQuery] Re: Is A Child Of?

2009-02-12 Thread Ami
   //logs true > console.log( $('#pops').childOf( $('#pops') ) );         //logs false > > On Feb 11, 1:45 pm, Ricardo Tomasi wrote: > > > > > 'return true' inside the each callback works like a 'c

[jQuery] Re: Is A Child Of?

2009-02-11 Thread Ami
   }); >    return p; > > }; > > cheers, > - ricardo > > On Feb 11, 1:56 pm, Ami wrote: > > > The Best solution: > > > I have writed a very small plugin (1 line) for that, by using the code > > of Richard > > > jQuery.fn.childOf=function(a){va

[jQuery] Re: Is A Child Of?

2009-02-11 Thread Ami
The Best solution: I have writed a very small plugin (1 line) for that, by using the code of Richard jQuery.fn.childOf=function(a){var b=this;return ($(b).parents().filter (function() { return this === $(a)[0]; }).length )} For Example: $("div").childOf(document.body) $("div").childOf($(documen

[jQuery] Re: $(element in other iframe)

2009-02-11 Thread Ami
Thank you. You write that I need to wait until the iframe has been loaded. So I can do this? var frame=$("#iframe")[0].contentdocument; $(frame).ready(function () { alert('Iframe has been loaded!'); }); Am I right? and Thank you again. On Feb 8, 6:07 pm, Stephan Veigl wro

[jQuery] $(element in other iframe)

2009-02-08 Thread Ami
Can I use jQuery to work with elements in other frames? For Example: $("#frame1 document") OR $(document, $("#frame1"))

[jQuery] Re: Detecting variable passed by # in URL

2009-01-27 Thread Ami
Jquery History plugin can help you. The problem is that no event trigger when the user change the hash value. On Jan 28, 4:45 am, MorningZ wrote: > You can read the "hash" value by location.hash > > http://www.devguru.com/Technologies/ecmascript/quickref/location_hash... > > Not really sure whe

[jQuery] Re: How to get the value of List and concatenate with JQUERY

2009-01-25 Thread Ami
It's is a bug. I copy&paste you code, and I see an alert "123". You can simple try it, buy paste this code in FireBug console in any website that support jQuery (like jQuery.com) On Jan 23, 5:14 pm, nk wrote: > Hi Ami, > > Thanks for your response. > I

[jQuery] Re: $.live and performance

2009-01-25 Thread Ami
Read all about it at the docs:http://docs.jquery.com/Events/live > > On Jan 23, 3:13 am, Ami wrote: > > > Hello. > > Sorry about my grammar, English isn't my tang. > > > I want to understand how the "$(selector).live()" works. > > > I have a DOM with a l

[jQuery] Re: jquery.ajax question.

2009-01-23 Thread Ami
You can't do it by using $.load. You can do it by using $.ajax, and set the dataType to 'script' For example:

[jQuery] $.live and performance

2009-01-22 Thread Ami
Hello. Sorry about my grammar, English isn't my tang. I want to understand how the "$(selector).live()" works. I have a DOM with a lot of elements. So if I write: $('span[attr=value]').live('click').. When jQuery search for this SPAN? jQuery search immediately for all span[attr=value], or ev

[jQuery] Re: $.ajaxSubmit ( ERROR :

2009-01-22 Thread Ami
Thank you. On Jan 23, 5:53 am, Mike Alsup wrote: > > Do you think that there is a way to get a return code, when uploading > > file? > > > > > > > > > > $("form").ajaxSubmit ( {error: function () {alert('error')}  ); > > > Now because the upload is by using invisible iframe and not by XHR, I

[jQuery] $.ajaxSubmit ( ERROR :

2009-01-22 Thread Ami
Hello. Do you think that there is a way to get a return code, when uploading file? $("form").ajaxSubmit ( {error: function () {alert('error')} ); Now because the upload is by using invisible iframe and not by XHR, I think that I cannot get the error function to work. Am I right? I am us

[jQuery] Re: Can't append html to textare after jquery.form ajax submit

2009-01-22 Thread Ami
dataType: 'json', success: function () {process();bindButtons ()} }); function process(json) { blah blah blah irrelevant } bindButtons() }); }); On Jan 23,

[jQuery] Re: Can't append html to textare after jquery.form ajax submit

2009-01-22 Thread Ami
You can try this. 1. Create this function: function bindButtons () { $('#bold,#italic,#underline').unbind().click(function() { $('#body').append($(this).val()); } 2. change the ready function: $(document).ready(function() { $('#journalForm').ajaxF

[jQuery] Re: How to get the value of List and concatenate with JQUERY

2009-01-22 Thread Ami
My javascript syntax is better than my English syntax, So i hope that you can understand it $(document.body).prepend("abcdefghi"); var result=''; $.each ( $("#theUl").children(), function () {result+=($(this).attr('id'))} ); alert(result); Good luck, A

[jQuery] Re: Looping through headers object

2009-01-21 Thread Ami
Please give as a simple HTML of your table. so we can try help you On Jan 22, 12:21 am, shinobi wrote: > Hi everybody. > I have an html table with a fixed number columns (or headers) and a > variable number of columns, that may vary in numbers depending on data > in the DB. > > I want to make so

[jQuery] Re: Looping JSON Data

2009-01-21 Thread Ami
I think that this what R U searching for: var theList={"list":[ {"id":"15","name":"Testing","description":"test","owner":"1","active":"1","featured":"0","machinename":"testing"}, {"id":"16","name":"Testing","description":"test","owner":"1","active":"1","featured":"0","machinename":"testing"}, {"i

[jQuery] $.ajaxSuccess.

2009-01-21 Thread Ami
Sorry about my grammar, English isn't my tang. What is the different betwen: $(document).ajaxSucess(function () {}) $('div').ajaxSucess(function () {}) $.ajaxSetup (success: function () {} ) *When I am execute* $.ajax(url); Also, how I can change the data before it's send to the server by us

[jQuery] Re: $(' Expert jQuery & JS synatx ' ).show

2009-01-19 Thread Ami
. > > (expr ? 'a' : 'a')(); > > However, since your function 'a' is global it is a method of the window. You > could use bracket notation to reference the method like this. > > window[ (expr ? 'a' : 'a') ]() > > -- >

[jQuery] Re: $(' Expert jQuery & JS synatx ' ).show

2009-01-18 Thread Ami
27;a' : 'a']() but it's didn't work. why? On Jan 19, 5:15 am, Brandon Aaron wrote: > I believe you are looking for the following syntax: > $(selector)[ (expr ? 'next' : 'before') ]().show(); > > -- > Brandon Aaron > > On Sun, Jan 1

[jQuery] $(' Expert jQuery & JS synatx ' ).show

2009-01-18 Thread Ami
Sorry about my grammar, English isn't my lang. I am trying to write code like that: var expr=true,selector='div'; $(selector) (expr ? .next() : .before() ). show(); But it's not JS syntax. So how can I do it? I know,that I can do it like that: if (expr) $(selector)..befo

[jQuery] Re: newby... cannot get $("div").length; to work

2009-01-18 Thread Ami
You can short it to: $(function() { var divcount = $("div").length; alert("start=" + divcount); }); On Jan 19, 4:55 am, Karl Rudd wrote: > The code is being run before the DIVs actually exist. You need to > "wrap" the code in a "ready" event handler, like so: > > $(document).ready( functi

[jQuery] Re: $(selector).add($(.next))

2009-01-18 Thread Ami
Thank you. This is exactly what I search. 10 Points :) On Jan 19, 4:45 am, Ricardo Tomasi wrote: > The only alternative is > > $(selector).next().andSelf() > > On Jan 19, 12:08 am, Ami wrote: > > > Hello, > > > Sorry about my grammar, English isn't

[jQuery] $(selector).add($(.next))

2009-01-18 Thread Ami
Hello, Sorry about my grammar, English isn't my tang. How I add to $ the next elmement. Some think Like I can do: $(selector).add( $(selector).next) But I think that there is a better solution. Thank you.

[jQuery] Re: Standards box model

2009-01-15 Thread Ami
; > > > Try it and see what Internet Explorer 6 does. > > > Karl Rudd > > > On Thu, Jan 15, 2009 at 3:53 PM, Ami wrote: > > > > So you for you fast answer. > > > 5 point > > > (: > > > > Do I must to change all my pages from Transitional t

[jQuery] Re: Standards box model

2009-01-14 Thread Ami
TML. You > could use HTML Strict: > > "http://www.w3.org/TR/html4/strict.dtd";> > > More information here: >  http://en.wikipedia.org/wiki/Quirksmode > > Karl Rudd > > > > On Thu, Jan 15, 2009 at 3:08 PM, Ami wrote: > > > Hello, > > S

[jQuery] Re: The new core LIVE.

2009-01-14 Thread Ami
Thank you. Do you know also about the standards model? that I asked before? Link to the question: http://groups.google.com/group/jquery-en/browse_thread/thread/6545a6ced519de33# On 15 ינואר, 06:36, Karl Rudd wrote: > Yes. > > Karl Rudd > > > > On Thu, Jan 15, 2009 a

[jQuery] The new core LIVE.

2009-01-14 Thread Ami
The new core LIVE. Hello. Can I use a namespace with live? $.live('click.fuc1',function1 }; $.live('click.fun2'); $.die('click.func1');

[jQuery] Standards box model

2009-01-14 Thread Ami
Hello, Sorry about my grammar, English isn't my tang. I read in the Jquery 1.3:release notes, that I must use W3c standards mode. I tried to understand what it's mean. Now my HTML start like that: DO I need to replace it to this: (Like in Jquery website) http://www.w3.org/TR/xhtml1/DTD/xhtml

[jQuery] move object with all events.

2008-09-09 Thread Ami
Sorry about my grammar, English isn't my tango $("#elment").click ( function () { alert('ok') } ); Now, when I move the element: $("#element").insertAfter( otherElement); The click event is automatically unbind. How Can I fix it?