Re: [jQuery] Local XML
I suppose that if you write: function handleResponse(data) { var xml = $(data.responseXml) } the xml var is a DOM xml file. But I don't try it. Cheers, -- Francesco Dmitrii 'Mamut' Dimandt ha scritto: I need to load and process a local XML file from a page displayed locally. However, if XML is loaded through .get, it is passed to the processing function as text, not as a document. How can I ensure that the XML that is loaded gets parsed and presented as DOM? That is, I need to to something like: $(document).ready( function() { $(a.ex).click( function() { $.get( $(this).attr(href), handleResponse ) } ); } ); function handleResponse(data) { // do stuff not with text that gets passed, but wit DOM } HTML: a href=xml/1.xml class=exExample 1/a a href=xml/2.xml class=exExample 2/a Thank you. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] javascript object not array?
d is an Object d.Products is an Array You could test you objects using the constructor property. If you try: alert (d.constructor) you could see that it shows a result different from alert(d.Products.constructor) --Francesco [EMAIL PROTECTED] ha scritto: I'm confused. Why does: var d = { Products: [ Books, Electronics ] }; alert(typeof d[Products]); Report object and not array? How am I supposed to tell if I have an array rather than a map object? Thanks, T. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] simple - focusing on an input
Use: $(#orderFinder input).val('')[0].focus() --Francesco Paul ha scritto: I'm trying to focus the cursor in a text box at the end of a simple animation, and it won't. The cursor shows up temporarily in the box, then flits away... $(#orderFinder).SlideToggleUp(250, null, 'bounceout');// show/hide the div $(#orderFinder input).val('').focus();// reset the value and focus on the field ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] checking created items again via DOM
Hi, you could try the following: linClick = function () { $('.lin').unbind('click').click( function(){ $(#sublevels).append(span class='lin'+split[1]+/spanbr/) linClick() } ) } linClick() --Francesco phplord ha scritto: Hi; I got an interesting problem. I have a code like this: $('.lin').click(function(){ $(#sublevels).append(span class='lin'+split[1]+/spanbr /); } As you see,I have been adding span tags with class lin when another span tag with class lin was clicked. Problem is created span tags with class link must run this code also when they are clicked because they have the same class name (lin) But they donot work What's the problem? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jQuick 1.3 adds support for LABELs in Safari
Hi all, today I released jQuick 1.3. This new version adds support for LABELs in Safari. Cheers, Francesco Sullo http://jquick.sullof.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jQuick 1.3.1 improves support for LABELs in Safari
After the first public tests of jQuick I improved the support for label in Safari. In fact, in 1.3.1, the following example works well even in Safari: $.FORM({}, $.LABEL({'for': 'one'}, Label ), $.INPUT({id: one', type: checkbox', onclick: alert(1)}) ) Cheers, Francesco ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jQuick 1.2 released and beta 4 preview of PassPack
During the development of the first releases of PassPack, I adopted Easy DOM Creation by Michael Geary to quickly manage the DOM elements. But, with the beta4 version of PassPack I needed to overcome Michael's library's limits (due to the compatibility with Prototype). So I developed jQuick. The new version 1.2 is more complete. ( If you want to try the unofficial beta4preview of PassPack you could connect to https://www.passpack.com/beta4preview Let me know your comments ) How jQuick works Suppose you want to obtain the following html code: div class=big span id=one class=psHello Joei!/i/span /div Using jQuick you could create the corresponding DOM elements with the following code: $.DIV({'class':'big'}, $.SPAN({id:'one','class':'ps'}, 'Hello Joe', $.I('!') ) ); Now suppose that you want to append to the big div an animated SPAN element. You could write: $('#big').append( $.SPAN( {id:'one','class':'ps'}, 'Hello Joe' ).animate({left: 50,opacity:'show'},1000) ); jQuick supports HTML code. So you could write: $.DIV({'class':'big'}, 'span class=psHello Joei!/i/span' ); It is useful if you have to pass the innerHTML of one tag to another. jQuick supports events if passed as attributes, even with IE. For example, instead of $.FORM({}, $.LABEL({'for':'one'},Digit ), $.INPUT({id:'one'}).click(setValues) ).bind('submit',function(){return false;}); you could write: $.FORM({onsubmit:'return false;'}, $.LABEL({'for':'one'},Digit ), $.INPUT({id:'one',onclick:'setValues()'}) ); jQuick preserves spaces. Download it at http://jquick.sullof.com Francesco Sullo [EMAIL PROTECTED] www.sullof.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] A little bug fixed in the beta 4 preview of PassPack
Hi all, about beta4preview of PassPack, during last test I commented a line so that after registration user cannot see anything. I'm sorry. Now it works well. -- During the development of the first releases of PassPack, I adopted Easy DOM Creation by Michael Geary to quickly manage the DOM elements. But, with the beta4 version of PassPack I needed to overcome Michael's library's limits (due to the compatibility with Prototype). So I developed jQuick. The new version 1.2 is more complete. ( If you want to try the unofficial beta4preview of PassPack you could connect to https://www.passpack.com/beta4preview Let me know your comments ) How jQuick works Suppose you want to obtain the following html code: div class=big span id=one class=psHello Joei!/i/span /div Using jQuick you could create the corresponding DOM elements with the following code: $.DIV({'class':'big'}, $.SPAN({id:'one','class':'ps'}, 'Hello Joe', $.I('!') ) ); Now suppose that you want to append to the big div an animated SPAN element. You could write: $('#big').append( $.SPAN( {id:'one','class':'ps'}, 'Hello Joe' ).animate({left: 50,opacity:'show'},1000) ); jQuick supports HTML code. So you could write: $.DIV({'class':'big'}, 'span class=psHello Joei!/i/span' ); It is useful if you have to pass the innerHTML of one tag to another. jQuick supports events if passed as attributes, even with IE. For example, instead of $.FORM({}, $.LABEL({'for':'one'},Digit ), $.INPUT({id:'one'}).click(setValues) ).bind('submit',function(){return false;}); you could write: $.FORM({onsubmit:'return false;'}, $.LABEL({'for':'one'},Digit ), $.INPUT({id:'one',onclick:'setValues()'}) ); jQuick preserves spaces. Download it at http://jquick.sullof.com Francesco Sullo [EMAIL PROTECTED] www.sullof.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Q: best way to create dynamic content?
I suggest to use jQuick. In your case you can create the code using: $('#myAnchor').append( $.DIV( id: myIdVar, 'class': myClassvar} ) jQuick is at http://jquick.sullof.com/ In the next days I will release a new powered version. nrwsteff ha scritto: short question: what is the recommanded/better/fastest (memory footprint/execution time) jQuery way to create dynamic content? the length of code is not so important for me. or should i use one of the DOM creation plugins? a) var myIdVar = 'id1'; var myClassVar = 'class1'; $('div/div').attr({'id':myIdVar,'class':myClassVar}).appendTo('#myAnchor '); or b) var myIdVar = 'id1'; var myClassVar = 'class1'; var myHtml = 'div '; myHtml += 'id='+myIdVar+' class='+myClassVar+'/div'; $('#myAnchor').append(myHtml); regards steff ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] ANNOUNCE: Alpha 2 of Ext 1.0 for jQuery is Available
Hi Rey, your Alpha 2 is one of the more exciting javascript libraries I have seen. Great! Rey Bango ha scritto: Guys, Alpha 2 of Ext 1.0 for jQuery is now available for download. You can find out more details here: http://www.yui-ext.com/forum/viewtopic.php?t=3084 and download Ext 1.0 for jQuery Alpha 2 here: http://www.yui-ext.com/forum/viewtopic.php?t=2940 Rey... ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] ANNOUNCE: Alpha 2 of Ext 1.0 for jQuery is Available
You are right. Alpha is great, but is too big for real web applications... Mikael Noone ha scritto: This is supercewl. Although, to bulky for me to use on webpages. 372kb plus jquery.. i just say, wow... that´s big! and then additional javascript code for the functions, html, css. plus content! That will be a huge site On 2/25/07, *Chris Domigan* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hawt!! ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New plugin: jQuick Tag Creator
If you want, you can add TAG to the tag's string. It works, F Andreas Wahlin ha scritto: absolutely, count in another switcher :D is it possible to redefine the $.TAG to something arbitrary, i've used dom.TAG in the past, or is the $. part dependant on the overall jQuery assignment? So jQuery.TAG would work? Andreas On Feb 17, 2007, at 21:27, Benjamin Sterling wrote: Sweet, I may be switching what I am using now to this plugin. On 2/17/07, *Francesco Sullo* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Yes. Differently from other quick tag generators, jQuick is jQuery specific. This is an advantage because anything you can do with jQuery is possible with jQuick methods. Is it possible to do things like var storage_for_future; $.DIV({'class':'big'}, storage_for_future = $.SPAN({id:'one','class':'ps'},'Hello Joe',$.I ({},'!')) ); and thus inline save references for DOM elements you create? Andreas ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com http://www.KenzoHosting.com ___ jQuery mailing list discuss@jquery.com mailto:discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] jQuick Tag Creator 1.1 released
Hi all. Today I improved jQuick. The new version 1.1 supports events if passed as attributes, even with IE. For example, instead of $.FORM({}, $.LABEL({'for':'one'},Digit ), $.INPUT({id:'one'}).click(setValues) ).submit(function(){return false;}); you could write: $.FORM({onsubmit:'return false;'}, $.LABEL({'for':'one'},Digit ), $.INPUT({id:'one',onclick:'setValues()'}) ); It is more compact and easier to understand. For info and download: http://jquick.sullof.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] jQuick Tag Creator 1.1 released
Suppose you want to add content to themyDiv div, you could write: $('#myDiv').append( $.DIV({'class':'big'}, $.SPAN({id:'one','class':'ps'}, 'Hello Joe', $.I({},'!') ) ) ); PS. I changed the 1.1 version some minutes ago in order to optimize it. Instead of use jQuick.attr function I preferred to extend jQuery with the method jQuickAttr. Rey Bango ha scritto: Francesco, This is a really nice plugin. Excellent work. I missed your original announcements so I had a quick question. If I wanted to inject a DIV into a specific section of my page (perhaps another DIV) using this code from your site: $.DIV({'class':'big'}, $.SPAN({id:'one','class':'ps'}, 'Hello Joe', $.I({},'!') ) ); how would I go about doing it? Rey Francesco Sullo wrote: Hi all. Today I improved jQuick. The new version 1.1 supports events if passed as attributes, even with IE. For example, instead of $.FORM({}, $.LABEL({'for':'one'},Digit ), $.INPUT({id:'one'}).click(setValues) ).submit(function(){return false;}); you could write: $.FORM({onsubmit:'return false;'}, $.LABEL({'for':'one'},Digit ), $.INPUT({id:'one',onclick:'setValues()'}) ); It is more compact and easier to understand. For info and download: http://jquick.sullof.com ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] New plugin: jQuick Tag Creator
Hi all, I want to announce a new plugin for jQuery. I hope you like it. Cheers, Francesco *** jQuick Tag Creator for jQuery http://jquick.sullof.com *How it works * Suppose you want to obtain the following html code: div class=big span id=one class=psHello Joei!/i/span /div Using jQuick you could create the corresponding DOM elements with the following code: $.DIV({'class':'big'}, $.SPAN({id:'one','class':'ps'},'Hello Joe',$.I({},'!')) ); Now suppose that you want to animate the SPAN element. You could write: $(#cico).append( $.DIV({'class':'big'}, $.SPAN({id:'one','class':'ps'}, 'Hello Joe',$.I({},'!') ).animate({left: 50, opacity: 'show'}, 1000) ) ); * Note * With jQuery 1.1.1, if you want to preserve spaces, you could apply a little fix to the jQuery clean method changing the line 449 from: var s = jQuery.trim(arg), ... to: var s = /^\s+/.test(arg) ? jQuery.trim(arg) : arg, ... so that only the tags are trimmed. jQuick supports all XHTML Strict and Frameset DTD tags but you can add what you want. jQuick was inspired by DOM Creation by Michael Geary (http://mg.to). Enjoy it! ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] New plugin: jQuick Tag Creator
Yes. Differently from other quick tag generators, jQuick is jQuery specific. This is an advantage because anything you can do with jQuery is possible with jQuick methods. Is it possible to do things like var storage_for_future; $.DIV({'class':'big'}, storage_for_future = $.SPAN({id:'one','class':'ps'},'Hello Joe',$.I ({},'!')) ); and thus inline save references for DOM elements you create? Andreas ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/