[jQuery] Re: I'll Donate $20USD to Jquery if you can teach me how to do this
Paypal Transaction ID: 8PY233604R986225R :D Thanks for your help. Actually, there were 2 parts that I didn't get.. one was the CSS selector syntax and how it needed to be formed inside of the initial grab.. Thats the learning curve. the way that 'day[name=Monday]show' didn't make any sense to me. in xpath i'd have to use the /day [...@name='monday']/show would have made more sense... The lack of quotes would have thrown me the most. i probably would have chained the show at the end of it, in another each function. So, basically, the initial dataset definition can be in the first part, I don't have to chain the find(day and attribute).find(show, data).each(function(){ do stuff here} which was the original track i was going down. Thanks so much again... this part has been haunting me. ~Doc On May 17, 8:20 pm, deltaf j...@deltafactory.com wrote: And now for the teaching part of the request... KrushRadio, the crucial part that I believe you wanted to be taught about is: $('day[name=Monday]show', data) If you're familiar with CSS selector syntax, that's a great head- start.The full details can be found athttp://docs.jquery.com/Selectors To break it down for you, the selector includes show elements that are children of day elements with name attributes equal to 'Monday'. All of the matched results are put into an array of elements which are iterated with .each(). Hope we've helped earn jQuery that donation! - jb On May 17, 8:43 pm, comslash.com comsl...@gmail.com wrote: $(function(){ $.ajax({ type: GET, url: test.xml, dataType: xml, success: function(data){ $('day[name=Monday]show', data).each(function(){ time = $(this).find('time').text(); dj = $(this).find('dj').text(); showname =$(this).find('showname').text(); $('body').append(time + 'br /' + dj + 'br /' + showname + 'br /br /'); }); } }); });- Hide quoted text - - Show quoted text -
[jQuery] Re: I'll Donate $20USD to Jquery if you can teach me how to do this
Paypal Transaction ID: 8PY233604R986225R :D Thanks for your help. Actually, there were 2 parts that I didn't get.. one was the CSS selector syntax and how it needed to be formed inside of the initial grab.. Thats the learning curve. the way that 'day[name=Monday]show' didn't make any sense to me. in xpath i'd have to use the /day [...@name='monday']/show would have made more sense... The lack of quotes would have thrown me the most. i probably would have chained the show at the end of it, in another each function. So, basically, the initial dataset definition can be in the first part, I don't have to chain the find(day and attribute).find(show, data).each(function(){ do stuff here} which was the original track i was going down. Thanks so much again... this part has been haunting me. ~Doc On May 17, 8:20 pm, deltaf j...@deltafactory.com wrote: And now for the teaching part of the request... KrushRadio, the crucial part that I believe you wanted to be taught about is: $('day[name=Monday]show', data) If you're familiar with CSS selector syntax, that's a great head- start.The full details can be found athttp://docs.jquery.com/Selectors To break it down for you, the selector includes show elements that are children of day elements with name attributes equal to 'Monday'. All of the matched results are put into an array of elements which are iterated with .each(). Hope we've helped earn jQuery that donation! - jb On May 17, 8:43 pm, comslash.com comsl...@gmail.com wrote: $(function(){ $.ajax({ type: GET, url: test.xml, dataType: xml, success: function(data){ $('day[name=Monday]show', data).each(function(){ time = $(this).find('time').text(); dj = $(this).find('dj').text(); showname =$(this).find('showname').text(); $('body').append(time + 'br /' + dj + 'br /' + showname + 'br /br /'); }); } }); });- Hide quoted text - - Show quoted text -
[jQuery] Re: dealing with a post (json) callback
On May 13, 1:29 pm, Peter Warnock petewarn...@gmail.com wrote: [ ] is an array literal, like { } is an object literal. var obj = json[0]; You shouldn't useevalon JSON. If you specify 'json' as your return type, jQuery will safelyevalvalid JSON. jQuery uses what ECMA 262 calls indirect eval. window[eval](json); | // Get the JavaScript object, if JSON is used. | if ( type == json ) |data = window[eval](( + data + )); ECMA 262 has something to say about indirect eval, too: | If value of the eval property is used in any way other than | a direct call (that is, other than by the explicit use of its | name as an Identifier which is the MemberExpression in a CallExpression), or if the | eval property is assigned to, an EvalError exception may be thrown. So it seems that using jQuery here would not be as safe as using a direct call to eval (as sneaks code uses) because the jQuery approach may legally result in EvalError. Further improvements to the code would be to replace the jQuery.each call and not use the query selector. This would have the effect of making the program smaller and faster, having the side effect of removing some dependencies on jQuery. Garrett - pw On May 12, 9:05 pm, sneaks deroacheee...@gmail.com wrote: hi, in firebug my callback data(object) is like so: [{product_brand:Creative Recreation,product_name:Cesario Hi,product_slug:CRM-CESAR-PRIME- HI,product_active:1,product_description:mens- red}] i have never noticed the square brackets before ... but when i attempt to use each to oterate through the obnject for values... i get nothing: var obj=eval('(' + json + ')'); console.log( obj ); jQuery.each(obj, function(i, val) { if (i) { alert(val); jQuery('#'+i).append(val); } }); this has always worked fro me before and i am not doing anything different this time... but i would appreciate any insight into what may be happeneing here
[jQuery] Re: Problem getting selected value from drop-down
Well, .val() on the select element returns the current value, so you can simplify that: $('select#myselect').change(function(){ var itemText = $(this).find('option:selected').text(); var itemValue = $(this).val(); $( '#answer' ).text( itemText + ' is number ' + itemValue ); }); or go even simpler with DOM methods (should be cross-browser, not sure): $('select#myselect').change(function(){ var sel = this.options[this.selectedIndex]; $( '#answer' ).text( sel.text + ' is number ' + sel.value ); }); On May 18, 12:40 am, cherry.aus...@gmail.com cherry.aus...@gmail.com wrote: Can I just thank you guys!! I've wasted hours trying to fiddle around with selectedIndex and stuff; the best I achieved was to get the html object returned :( It wasn't clear from the docs. Confusingly, I did get the option text with $( 'select#myselect option:selected' ).text(). But I couldn't get the value as well; I needed both. To clarify for anyone else struggling with it, here's what I did:- $( 'select#myselect' ).change( function () { var itemValue; var itemText; $( 'select#myselect option:selected' ).each( function () { itemValue = $( this ).val(); itemText = $( 'select#myselect option:selected').text(); }); $( '#answer' ).text( itemText + ' is number ' + itemValue ); // do some work with the answer }); I don't know why you have to name the select option twice, nor why it wouldn't work with $( this ) but there you go ... Thanks :D Of course, if any of you geniuses can improve my code, I'm listening! Cherry
[jQuery] Re: [autocomplete] Can I validate and update the entered value before doing the search?
I do not use any backend (if by that you mean server-side stuff that queries a db or something like that), I have such small datasets so all data is loaded statically in the html-file. I have tried to combined formatItem, formatMatch and formatResult to get what I want, but I have not managed to figure out how that would be done, if at all possible. My best though right now is to patch the plugin to include another option - substituteValue - which could be a function that validates and rewrites the data in any desired way before the match is done. /Ulf On May 15, 2:28 pm, Tom Worster f...@thefsb.org wrote: On 5/14/09 8:58 AM, Ulf Renman ulf.ren...@gmail.com wrote: When typing data into the autocomplete-field the list of matches is updated at every key pressed. Is it possible in any way to check and correct the data before doing the match. Or could you alter the way the match is done. The perfect example is when you have lots of users entering decimal values into a filed. Some people uses comma and some decimal-point. So you would like to permit both 2.23 and 2,23 to be matched against 2.23 in the list. I have some other usecases aswell so I would really like some suggestions on this. it allows you to format the suggestions from the backend but i'm not aware of the plugin having any feature for processing the field value before sending it to the backend. can't you do that processing in the backend itself?
[jQuery] Re: how to get a row of a table sorted with quicksearch plugin in a text box
kahaon ho bhai ? On Mon, May 18, 2009 at 10:23 AM, Mohd.Tareq tareq.m...@gmail.com wrote: Hi, To get data of a row you need to use id of that row. var row_data = $('#row_id').html(); To insert into your your form textarea Again you need to use id of that textarea. like : $('#textarea_Id').html('Some string value you can pass here '+row_data); Hope you will solve your problem hope I am on same scenario. Cheers :) On Sat, May 16, 2009 at 7:09 AM, Chass devilcha...@gmail.com wrote: Hi, first sorry for my english, but I'm speak spanish. my problem is that I don't know how get a data of a row and passing the result to a textbox located in my form for example : textbox.Text=(result); If somebody can help me.. thanks p.d: I use this jquery plug-in http://rikrikrik.com/jquery/quicksearch/#download -- ---| Regard |--- Mohd.Tareque
[jQuery] Re: How to replace hardcode_value in jquery library
what exactly do you mean by hardcode_value in jquery library?there isnt any/much AFAIK. if you mean the harcode_value in your code you can simply do $.get($(contact).val()), function(data){. correct me if i misunderstood you
[jQuery] Re: I'll Donate $20USD to Jquery if you can teach me how to do this
If you aren't forced to use XML, look at trying JSON instead. It is a MUCH friendlier format for passing information around. On May 17, 11:09 pm, KrushRadio - Doc drega...@gmail.com wrote: Paypal Transaction ID: 8PY233604R986225R :D Thanks for your help. Actually, there were 2 parts that I didn't get.. one was the CSS selector syntax and how it needed to be formed inside of the initial grab.. Thats the learning curve. the way that 'day[name=Monday]show' didn't make any sense to me. in xpath i'd have to use the /day [...@name='monday']/show would have made more sense... The lack of quotes would have thrown me the most. i probably would have chained the show at the end of it, in another each function. So, basically, the initial dataset definition can be in the first part, I don't have to chain the find(day and attribute).find(show, data).each(function(){ do stuff here} which was the original track i was going down. Thanks so much again... this part has been haunting me. ~Doc On May 17, 8:20 pm, deltaf j...@deltafactory.com wrote: And now for the teaching part of the request... KrushRadio, the crucial part that I believe you wanted to be taught about is: $('day[name=Monday]show', data) If you're familiar with CSS selector syntax, that's a great head- start.The full details can be found athttp://docs.jquery.com/Selectors To break it down for you, the selector includes show elements that are children of day elements with name attributes equal to 'Monday'. All of the matched results are put into an array of elements which are iterated with .each(). Hope we've helped earn jQuery that donation! - jb On May 17, 8:43 pm, comslash.com comsl...@gmail.com wrote: $(function(){ $.ajax({ type: GET, url: test.xml, dataType: xml, success: function(data){ $('day[name=Monday]show', data).each(function(){ time = $(this).find('time').text(); dj = $(this).find('dj').text(); showname =$(this).find('showname').text(); $('body').append(time + 'br /' + dj + 'br /' + showname + 'br /br /'); }); } }); });- Hide quoted text - - Show quoted text -
[jQuery] JQuery css selector
Hi everyone, How can I use the jQuery css selector on click function when the user clicks on the delete img or the delete a href tag? code div id=ribbon span class=right ul li a href=/items/makeActive/444img src=http://example.com/images/ checked.gif//a a href=/items/makeActive/444Make Active/a /li li id=delete_item a href=/items/delete/444img src=http://example.com/images/ unchecked.gif //a a href=/items/delete/444Delete/a /li li /li /ul /span /div /code Thanks everyone, ocptime --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery (English) group. To post to this group, send email to jquery-en@googlegroups.com To unsubscribe from this group, send email to jquery-en+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~--~~~~--~~--~--~---
[jQuery] Validate textbox on option selected value
Hi all, I have this validate code to validate a textbox if the user select a combo value: script type=text/javascript $(document).ready(function() { $(form#2form).validate({ rules: { viaAltro: { required: #AltraVia:checked } }, messages: { viaAltro: { required: Insert 'Altra via' } } }) }); /script and this is the HTML: select name=viaFornitura id=viaFornitura optionSeleziona la via/option option id=AltraViaAltro/option /select label for=viaAltroAltra via/label input name=viaAltro id=viaFornituraAltro type=text / but it doesn't work. Where the problem? Thanks a lot. Luigi
[jQuery] UI dialog resize (width height settings)
I had problem when try to reuse div element with ui.dialog(). If I set the width height the first time it works; but if I call it from second function with different width height it won't apply the new setting. Also if I manually resize the dialog when it appear after close and reopen it use the new size (resized manually) not the one I specified in the code. So my question is very simple is it possible to resize the dialog before it show up?
[jQuery] Re: JQuery css selector
$('#delete_item a').click(function(){ return (confirm('Are you sure?')); }); This will only work if there is one item to delete on the page because it uses an ID selector. If you have multiple items, use a class selector instead. on 18/05/2009 08:43 ocptime said:: Hi everyone, How can I use the jQuery css selector on click function when the user clicks on the delete img or the delete a href tag? code div id=ribbon span class=right ul li a href=/items/makeActive/444img src=http://example.com/images/ checked.gif//a a href=/items/makeActive/444Make Active/a /li li id=delete_item a href=/items/delete/444img src=http://example.com/images/ unchecked.gif //a a href=/items/delete/444Delete/a /li li /li /ul /span /div /code Thanks everyone, ocptime
[jQuery] remove() method IE 7 ERROR
Hi, I have an ajax request which is returning an xml, but when I tray to remove an element from the xml response I'm receiving the following error message: This is happening only in IE7 (I didn't tray in IE6) Line: 1283 EROOR: Object doesn't support this property or method This is my code: var pDialog = $(data_responce).find('PDialog'); if(pDialog ){ pDialog .remove(); } This is what I find in 1283 when i debugged it : // Compute a unique ID for the element if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name !jQuery.cache[ id ] ) jQuery.cache[ id ] = {};
[jQuery] Re: Validate textbox on option selected value
select-options don't have a checked property. You have to fix the selector #AltraVia:checked. Jörn On Mon, May 18, 2009 at 10:33 AM, ciupaz luigi.zambe...@gmail.com wrote: Hi all, I have this validate code to validate a textbox if the user select a combo value: script type=text/javascript $(document).ready(function() { $(form#2form).validate({ rules: { viaAltro: { required: #AltraVia:checked } }, messages: { viaAltro: { required: Insert 'Altra via' } } }) }); /script and this is the HTML: select name=viaFornitura id=viaFornitura optionSeleziona la via/option option id=AltraViaAltro/option /select label for=viaAltroAltra via/label input name=viaAltro id=viaFornituraAltro type=text / but it doesn't work. Where the problem? Thanks a lot. Luigi
[jQuery] Re: How to replace hardcode_value in jquery library
ok. thank you, it works Antonio On 18 Mag, 09:16, Steven Yang kenshin...@gmail.com wrote: what exactly do you mean by hardcode_value in jquery library?there isnt any/much AFAIK. if you mean the harcode_value in your code you can simply do $.get($(contact).val()), function(data){. correct me if i misunderstood you
[jQuery] jqModal rebind after reload
Hi, I'm using a standard jqModal thing. It works ok until after I reload the tab with an AJAX call. Then the .jqModal elements are not bound. The question is how to re-bind them again? I've tried $(#box).jqmAddTrigger(.jqModal); but it didn't help. And when I try to re-init the box with: $(#box).jqm(); after the ajax call, I get an error: H[this._jqm] is undefined Any ideas? thanks!
[jQuery] Re: JQuery css selector
Hi, It's not working :). How can i select using the jquery ul li selector? Thanks ocptime On 18 May, 13:39, Peter Edwards p...@bjorsq.net wrote: $('#delete_item a').click(function(){ return (confirm('Are you sure?')); }); This will only work if there is one item to delete on the page because it uses an ID selector. If you have multiple items, use a class selector instead. on 18/05/2009 08:43 ocptime said:: Hi everyone, How can I use the jQuery css selector on click function when the user clicks on the delete img or the delete a href tag? code div id=ribbon span class=right ul li a href=/items/makeActive/444img src=http://example.com/images/ checked.gif//a a href=/items/makeActive/444Make Active/a /li li id=delete_item a href=/items/delete/444img src=http://example.com/images/ unchecked.gif //a a href=/items/delete/444Delete/a /li li /li /ul /span /div /code Thanks everyone, ocptime
[jQuery] Re: JQuery css selector
Hi, It's not working :). How can i select using the jquery ul li selector? Thanks ocptime On 18 May, 13:39, Peter Edwards p...@bjorsq.net wrote: $('#delete_item a').click(function(){ return (confirm('Are you sure?')); }); This will only work if there is one item to delete on the page because it uses an ID selector. If you have multiple items, use a class selector instead. on 18/05/2009 08:43 ocptime said:: Hi everyone, How can I use the jQuery css selector on click function when the user clicks on the delete img or the delete a href tag? code div id=ribbon span class=right ul li a href=/items/makeActive/444img src=http://example.com/images/ checked.gif//a a href=/items/makeActive/444Make Active/a /li li id=delete_item a href=/items/delete/444img src=http://example.com/images/ unchecked.gif //a a href=/items/delete/444Delete/a /li li /li /ul /span /div /code Thanks everyone, ocptime
[jQuery] Re: JQuery css selector
$('ul li').click(function(){ /* ... stuff ... */ }); will bind soem code to the click event on all ul li elements, but you'll probably want to pass it some kind of unique identifier otherwise you'll get screwy results and be unable to do anything meaningful with the function. On May 18, 10:34 am, ocptime mail.samgeo...@gmail.com wrote: Hi, It's not working :). How can i select using the jquery ul li selector? Thanks ocptime On 18 May, 13:39, Peter Edwards p...@bjorsq.net wrote: $('#delete_item a').click(function(){ return (confirm('Are you sure?')); }); This will only work if there is one item to delete on the page because it uses an ID selector. If you have multiple items, use a class selector instead. on 18/05/2009 08:43 ocptime said:: Hi everyone, How can I use the jQuery css selector on click function when the user clicks on the delete img or the delete a href tag? code div id=ribbon span class=right ul li a href=/items/makeActive/444img src=http://example.com/images/ checked.gif//a a href=/items/makeActive/444Make Active/a /li li id=delete_item a href=/items/delete/444img src=http://example.com/images/ unchecked.gif //a a href=/items/delete/444Delete/a /li li /li /ul /span /div /code Thanks everyone, ocptime
[jQuery] Re: How can I make diferent things depending on the 'msg' variable?
Any help :( ? On 17 mayo, 00:06, Jere jg13...@gmail.com wrote: Hi, The fact is, I want to have diferent functions depending on the 'msg' variable. For example, if the msg variable is error i want son events to hapen a some other events not. My code is this: $('#login').ajaxForm({ url: 'revisar.php', beforeSubmit: function() { $('#loginCaja').html('Por favor espere...'); }, success: function(msg) { $('#loginCaja') .fadeIn('slow',function(){ }); if(msg=='error'){ $('#loginCaja').html('Usuario incorrecto'); } else { $('#loginCaja').html(msg); } $('#registroBox').fadeOut('slow'); } , error: function() { $('#loginCaja') .fadeIn('slow',function(){ }) .html('Error'); }} ); }); I wrote an if clause in the msg variable, but this doesnt works, it alwals like if the if is false. How can i make this work? I have jQuery library and jQuery.form library. Sorry for my english, i am from argentina. Thanks in advance
[jQuery] Re: JQuery css selector
$('ul li').click(function(){ /* ... stuff ... */ }); will bind code to the click event on all ul li elements in the document, but you'll probably want to pass it some kind of unique identifier otherwise you may end up triggering the code when you don't want to since all li would trigger the same code, and you'd be unable to do anything meaningful with the function because all the li clicks would do exactly the same thing. On May 18, 10:50 am, ocptime mail.samgeo...@gmail.com wrote: Hi, It's not working :). How can i select using the jquery ul li selector? Thanks ocptime On 18 May, 13:39, Peter Edwards p...@bjorsq.net wrote: $('#delete_item a').click(function(){ return (confirm('Are you sure?')); }); This will only work if there is one item to delete on the page because it uses an ID selector. If you have multiple items, use a class selector instead. on 18/05/2009 08:43 ocptime said:: Hi everyone, How can I use the jQuery css selector on click function when the user clicks on the delete img or the delete a href tag? code div id=ribbon span class=right ul li a href=/items/makeActive/444img src=http://example.com/images/ checked.gif//a a href=/items/makeActive/444Make Active/a /li li id=delete_item a href=/items/delete/444img src=http://example.com/images/ unchecked.gif //a a href=/items/delete/444Delete/a /li li /li /ul /span /div /code Thanks everyone, ocptime --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery (English) group. To post to this group, send email to jquery-en@googlegroups.com To unsubscribe from this group, send email to jquery-en+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-en?hl=en -~--~~~~--~~--~--~---
[jQuery] Re: remove() method IE 7 ERROR
remove() will remove an object from the DOM, but you're jsut trying to remove part of a string. use replace()? On May 18, 9:42 am, snakebit bozhidar...@gmail.com wrote: Hi, I have an ajax request which is returning an xml, but when I tray to remove an element from the xml response I'm receiving the following error message: This is happening only in IE7 (I didn't tray in IE6) Line: 1283 EROOR: Object doesn't support this property or method This is my code: var pDialog = $(data_responce).find('PDialog'); if(pDialog ){ pDialog .remove(); } This is what I find in 1283 when i debugged it : // Compute a unique ID for the element if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name !jQuery.cache[ id ] ) jQuery.cache[ id ] = {};
[jQuery] Re: JQuery css selector
Hi, It's not working :). How can i select using the jquery ul li selector? Thanks ocptime On 18 May, 13:39, Peter Edwards p...@bjorsq.net wrote: $('#delete_item a').click(function(){ return (confirm('Are you sure?')); }); This will only work if there is one item to delete on the page because it uses an ID selector. If you have multiple items, use a class selector instead. on 18/05/2009 08:43 ocptime said:: Hi everyone, How can I use the jQuery css selector on click function when the user clicks on the delete img or the delete a href tag? code div id=ribbon span class=right ul li a href=/items/makeActive/444img src=http://example.com/images/ checked.gif//a a href=/items/makeActive/444Make Active/a /li li id=delete_item a href=/items/delete/444img src=http://example.com/images/ unchecked.gif //a a href=/items/delete/444Delete/a /li li /li /ul /span /div /code Thanks everyone, ocptime
[jQuery] Re: remove() method IE 7 ERROR
remove() will remove an object from the DOM, but essentially you're just trying to remove part of a string aren't you? maybe try replace()? On May 18, 9:42 am, snakebit bozhidar...@gmail.com wrote: Hi, I have an ajax request which is returning an xml, but when I tray to remove an element from the xml response I'm receiving the following error message: This is happening only in IE7 (I didn't tray in IE6) Line: 1283 EROOR: Object doesn't support this property or method This is my code: var pDialog = $(data_responce).find('PDialog'); if(pDialog ){ pDialog .remove(); } This is what I find in 1283 when i debugged it : // Compute a unique ID for the element if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name !jQuery.cache[ id ] ) jQuery.cache[ id ] = {};
[jQuery] Re: JQuery css selector
Hi, It's not working :). How can i select using the jquery ul li selector? Thanks ocptime On 18 May, 13:39, Peter Edwards p...@bjorsq.net wrote: $('#delete_item a').click(function(){ return (confirm('Are you sure?')); }); This will only work if there is one item to delete on the page because it uses an ID selector. If you have multiple items, use a class selector instead. on 18/05/2009 08:43 ocptime said:: Hi everyone, How can I use the jQuery css selector on click function when the user clicks on the delete img or the delete a href tag? code div id=ribbon span class=right ul li a href=/items/makeActive/444img src=http://example.com/images/ checked.gif//a a href=/items/makeActive/444Make Active/a /li li id=delete_item a href=/items/delete/444img src=http://example.com/images/ unchecked.gif //a a href=/items/delete/444Delete/a /li li /li /ul /span /div /code Thanks everyone, ocptime
[jQuery] Re: JQuery css selector
are you initiating the click()? $(function() { $(ul li).click(function () { alert(clicky, innit.); }); }); On May 18, 10:58 am, ocptime mail.samgeo...@gmail.com wrote: Hi, It's not working :). How can i select using the jquery ul li selector? Thanks ocptime On 18 May, 13:39, Peter Edwards p...@bjorsq.net wrote: $('#delete_item a').click(function(){ return (confirm('Are you sure?')); }); This will only work if there is one item to delete on the page because it uses an ID selector. If you have multiple items, use a class selector instead. on 18/05/2009 08:43 ocptime said:: Hi everyone, How can I use the jQuery css selector on click function when the user clicks on the delete img or the delete a href tag? code div id=ribbon span class=right ul li a href=/items/makeActive/444img src=http://example.com/images/ checked.gif//a a href=/items/makeActive/444Make Active/a /li li id=delete_item a href=/items/delete/444img src=http://example.com/images/ unchecked.gif //a a href=/items/delete/444Delete/a /li li /li /ul /span /div /code Thanks everyone, ocptime
[jQuery] Re: JQuery css selector
$(function() { $(ul li).click(function () { alert(clicky, innit.); }); }); maybe take a look through the jquery tutorials here - http://docs.jquery.com/Tutorials On May 18, 11:07 am, ocptime mail.samgeo...@gmail.com wrote: Hi, It's not working :). How can i select using the jquery ul li selector? Thanks ocptime On 18 May, 13:39, Peter Edwards p...@bjorsq.net wrote: $('#delete_item a').click(function(){ return (confirm('Are you sure?')); }); This will only work if there is one item to delete on the page because it uses an ID selector. If you have multiple items, use a class selector instead. on 18/05/2009 08:43 ocptime said:: Hi everyone, How can I use the jQuery css selector on click function when the user clicks on the delete img or the delete a href tag? code div id=ribbon span class=right ul li a href=/items/makeActive/444img src=http://example.com/images/ checked.gif//a a href=/items/makeActive/444Make Active/a /li li id=delete_item a href=/items/delete/444img src=http://example.com/images/ unchecked.gif //a a href=/items/delete/444Delete/a /li li /li /ul /span /div /code Thanks everyone, ocptime
[jQuery] Re: Validate textbox on option selected value
How can I make this Jorn? Luigi On May 18, 10:42 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: select-options don't have a checked property. You have to fix the selector #AltraVia:checked. Jörn On Mon, May 18, 2009 at 10:33 AM, ciupaz luigi.zambe...@gmail.com wrote: Hi all, I have this validate code to validate a textbox if the user select a combo value: script type=text/javascript $(document).ready(function() { $(form#2form).validate({ rules: { viaAltro: { required: #AltraVia:checked } }, messages: { viaAltro: { required: Insert 'Altra via' } } }) }); /script and this is the HTML: select name=viaFornitura id=viaFornitura optionSeleziona la via/option option id=AltraViaAltro/option /select label for=viaAltroAltra via/label input name=viaAltro id=viaFornituraAltro type=text / but it doesn't work. Where the problem? Thanks a lot. Luigi- Hide quoted text - - Show quoted text -
[jQuery] Re: remove() method IE 7 ERROR
instead of $(data_responce).find('PDialog'); try this $('div'+data_responce+'/div').find('PDialog'); On May 18, 1:42 pm, snakebit bozhidar...@gmail.com wrote: Hi, I have an ajax request which is returning an xml, but when I tray to remove an element from the xml response I'm receiving the following error message: This is happening only in IE7 (I didn't tray in IE6) Line: 1283 EROOR: Object doesn't support this property or method This is my code: var pDialog = $(data_responce).find('PDialog'); if(pDialog ){ pDialog .remove(); } This is what I find in 1283 when i debugged it : // Compute a unique ID for the element if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name !jQuery.cache[ id ] ) jQuery.cache[ id ] = {};
[jQuery] Re: JQuery css selector
Take a look at this example: http://bjorsq.net/selector.html on 18/05/2009 11:07 ocptime said:: Hi, It's not working :). How can i select using the jquery ul li selector? Thanks ocptime On 18 May, 13:39, Peter Edwards p...@bjorsq.net wrote: $('#delete_item a').click(function(){ return (confirm('Are you sure?')); }); This will only work if there is one item to delete on the page because it uses an ID selector. If you have multiple items, use a class selector instead. on 18/05/2009 08:43 ocptime said:: Hi everyone, How can I use the jQuery css selector on click function when the user clicks on the delete img or the delete a href tag? code div id=ribbon span class=right ul li a href=/items/makeActive/444img src=http://example.com/images/ checked.gif//a a href=/items/makeActive/444Make Active/a /li li id=delete_item a href=/items/delete/444img src=http://example.com/images/ unchecked.gif //a a href=/items/delete/444Delete/a /li li /li /ul /span /div /code Thanks everyone, ocptime
[jQuery] Re: Validate textbox on option selected value
Try this (untested): required: #viaFornitura[selectedIndex=1] Jörn On Mon, May 18, 2009 at 12:13 PM, ciupaz luigi.zambe...@gmail.com wrote: How can I make this Jorn? Luigi On May 18, 10:42 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: select-options don't have a checked property. You have to fix the selector #AltraVia:checked. Jörn On Mon, May 18, 2009 at 10:33 AM, ciupaz luigi.zambe...@gmail.com wrote: Hi all, I have this validate code to validate a textbox if the user select a combo value: script type=text/javascript $(document).ready(function() { $(form#2form).validate({ rules: { viaAltro: { required: #AltraVia:checked } }, messages: { viaAltro: { required: Insert 'Altra via' } } }) }); /script and this is the HTML: select name=viaFornitura id=viaFornitura optionSeleziona la via/option option id=AltraViaAltro/option /select label for=viaAltroAltra via/label input name=viaAltro id=viaFornituraAltro type=text / but it doesn't work. Where the problem? Thanks a lot. Luigi- Hide quoted text - - Show quoted text -
[jQuery] What's the best way to replace text in a node?
I'm guessing this should be a simple one for the jQuery stalwarts here. I've recently moved over from Protoype and was used to using the update() function to replace text within a node - something like this: PROTOTYPE p id='dText'text to be replaced/p $('dText').update('New text string') JQUERY p id='dText'text to be replaced/p $('#dText').remove().append('New text string') Now it appears to me that in jQuery, there isn't an out of the box function to replace the contents of a node without also replacing the node too, hence the reason I am chaining remove() and append(). Is there a better way to achieve this? Many thanks George
[jQuery] Re: What's the best way to replace text in a node?
Sorry, folks, I'm not using remove(), I'm using empty() - like this: JQUERY p id='dText'text to be replaced/p $('#dText').empty().append('New text string') On May 18, 12:02 pm, George george.bea...@googlemail.com wrote: I'm guessing this should be a simple one for the jQuery stalwarts here. I've recently moved over from Protoype and was used to using the update() function to replace text within a node - something like this: PROTOTYPE p id='dText'text to be replaced/p $('dText').update('New text string') JQUERY p id='dText'text to be replaced/p $('#dText').remove().append('New text string') Now it appears to me that in jQuery, there isn't an out of the box function to replace the contents of a node without also replacing the node too, hence the reason I am chaining remove() and append(). Is there a better way to achieve this? Many thanks George
[jQuery] images height() or attr(height) for dynamically added elements
Hello everybody. I am experiencing difficulties in calculating the height of dynamically added images. I have a new plugin wich i have already released and i'm happy wih it, but one of settings users can choose is to change the 'layout' of the buttons in the gallery by adding an image instead of the default +/- text. To properly vertically-align an image i use to calculate the height of the contaner /2; then the height of the image to insert /2 and add margin-top to that image to place vertically aligned in the middle. An surprisingly it is perfect in ie6 but not in FF. See yourself: the grey gallery (under spaceshiptwo) will have two gif for its buttons. In FF the gifs will be wrongly aligned to the bottom. I think it's something related to the fact that when i serach for the gif height, the gif is not loaded so the calculation cannot be made, but why or how in IE it is calculated? Also, it is better to use attr(height) that seems to work even if the height attribute is not set at all or height()? This is the page, you can look at the sorce of the plugin, line 134 var innerImgH = jQuery(a#right + j + span img).attr(height); http://www.gcmingati.net/wordpress/wp-content/lab/jquery/svwt/index.html
[jQuery] Re: remove() method IE 7 ERROR
I'm little confused. Why you think I want to remove a string? What I'm doing is with find('PDialog') to access the PDialog node and after that to remove it. On 18 Май, 13:01, ryan.j ryan.joyce...@googlemail.com wrote: remove() will remove an object from the DOM, but essentially you're just trying to remove part of a string aren't you? maybe try replace()? On May 18, 9:42 am, snakebit bozhidar...@gmail.com wrote: Hi, I have an ajax request which is returning an xml, but when I tray to remove an element from the xml response I'm receiving the following error message: This is happening only in IE7 (I didn't tray in IE6) Line: 1283 EROOR: Object doesn't support this property or method This is my code: var pDialog = $(data_responce).find('PDialog'); if(pDialog ){ pDialog .remove(); } This is what I find in 1283 when i debugged it : // Compute a unique ID for the element if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name !jQuery.cache[ id ] ) jQuery.cache[ id ] = {};
[jQuery] Re: Superfish - Multi-Column Dropdown
Can anyone provide me an example of how I can modify supersubs.js to create a multi-column dropdown? Thanks! On May 16, 12:46 pm, Ethan Mateja ethan.mat...@gmail.com wrote: Thanks for the prompt reply! I took a peek at supersubs.js and my question is this: Is it just a matter of adding an extra div tag between ul's and styling in a manner similar to the link below? http://www.gunlaug.no/tos/moa_41.html I have been working with suckerfish menu's for a year or so and have just gotten into the multicolumn feature. What I have yet to wrap my head around is how to create the second column. Any examples are greatly appreciated. On Sat, May 16, 2009 at 10:16 AM, Charlie charlie...@gmail.com wrote: you can put columns into the sub menus fairly easily with supersubs.js okdok wrote: I would like to integrate a multi-column superfish into a Joomla! 1.5.10 production site. Has anyone been able to accomplish something similar? -- Respectfully, Ethan Mateja +++ Packetforwardwww.packetforward.com
[jQuery] Re: remove() method IE 7 ERROR
I tray that, but find didn't finde PDialog node. On 18 Май, 13:20, Karthikraj karthik271...@gmail.com wrote: instead of $(data_responce).find('PDialog'); try this $('div'+data_responce+'/div').find('PDialog'); On May 18, 1:42 pm, snakebit bozhidar...@gmail.com wrote: Hi, I have an ajax request which is returning an xml, but when I tray to remove an element from the xml response I'm receiving the following error message: This is happening only in IE7 (I didn't tray in IE6) Line: 1283 EROOR: Object doesn't support this property or method This is my code: var pDialog = $(data_responce).find('PDialog'); if(pDialog ){ pDialog .remove(); } This is what I find in 1283 when i debugged it : // Compute a unique ID for the element if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name !jQuery.cache[ id ] ) jQuery.cache[ id ] = {};
[jQuery] Re: What's the best way to replace text in a node?
.text('some text') or .html('somehtml/some') ? On May 18, 7:08 am, George george.bea...@googlemail.com wrote: Sorry, folks, I'm not using remove(), I'm using empty() - like this: JQUERY p id='dText'text to be replaced/p $('#dText').empty().append('New text string') On May 18, 12:02 pm, George george.bea...@googlemail.com wrote: I'm guessing this should be a simple one for the jQuery stalwarts here. I've recently moved over from Protoype and was used to using the update() function to replace text within a node - something like this: PROTOTYPE p id='dText'text to be replaced/p $('dText').update('New text string') JQUERY p id='dText'text to be replaced/p $('#dText').remove().append('New text string') Now it appears to me that in jQuery, there isn't an out of the box function to replace the contents of a node without also replacing the node too, hence the reason I am chaining remove() and append(). Is there a better way to achieve this? Many thanks George
[jQuery] Re: I'll Donate $20USD to Jquery if you can teach me how to do this
And when size is important, smaller too. On May 18, 3:21 am, Josh Powell seas...@gmail.com wrote: If you aren't forced to use XML, look at trying JSON instead. It is a MUCH friendlier format for passing information around. On May 17, 11:09 pm, KrushRadio - Doc drega...@gmail.com wrote: Paypal Transaction ID: 8PY233604R986225R :D Thanks for your help. Actually, there were 2 parts that I didn't get.. one was the CSS selector syntax and how it needed to be formed inside of the initial grab.. Thats the learning curve. the way that 'day[name=Monday]show' didn't make any sense to me. in xpath i'd have to use the /day [...@name='monday']/show would have made more sense... The lack of quotes would have thrown me the most. i probably would have chained the show at the end of it, in another each function. So, basically, the initial dataset definition can be in the first part, I don't have to chain the find(day and attribute).find(show, data).each(function(){ do stuff here} which was the original track i was going down. Thanks so much again... this part has been haunting me. ~Doc On May 17, 8:20 pm, deltaf j...@deltafactory.com wrote: And now for the teaching part of the request... KrushRadio, the crucial part that I believe you wanted to be taught about is: $('day[name=Monday]show', data) If you're familiar with CSS selector syntax, that's a great head- start.The full details can be found athttp://docs.jquery.com/Selectors To break it down for you, the selector includes show elements that are children of day elements with name attributes equal to 'Monday'. All of the matched results are put into an array of elements which are iterated with .each(). Hope we've helped earn jQuery that donation! - jb On May 17, 8:43 pm, comslash.com comsl...@gmail.com wrote: $(function(){ $.ajax({ type: GET, url: test.xml, dataType: xml, success: function(data){ $('day[name=Monday]show', data).each(function(){ time = $(this).find('time').text(); dj = $(this).find('dj').text(); showname =$(this).find('showname').text(); $('body').append(time + 'br /' + dj + 'br /' + showname + 'br /br /'); }); } }); });- Hide quoted text - - Show quoted text -
[jQuery] Re: UI dialog resize (width height settings)
You can only call .dialog({ width: XX, height: YY }) once. That's an init. After that you can change the width and height by calling dialog's option method, specifying the option you want to change, and the new value: $(#myDiv).dialog(option, width, newXX); $(#myDiv).dailog(option, height, newYY); - Richard On Mon, May 18, 2009 at 4:34 AM, c.sokun chornso...@gmail.com wrote: I had problem when try to reuse div element with ui.dialog(). If I set the width height the first time it works; but if I call it from second function with different width height it won't apply the new setting. Also if I manually resize the dialog when it appear after close and reopen it use the new size (resized manually) not the one I specified in the code. So my question is very simple is it possible to resize the dialog before it show up?
[jQuery] Problem jqm and $.get
hi, I am having problem when I use the $.get and jqm. I developed a easy example about the problem, you can download it from: http://cid-5c82aa0c9bbaf5b3.skydrive.live.com/self.aspx/Public/Forum/WebAppjQuery.zip When the example run, you can see a default.aspx page with two buttons. You need to press the LoadGrid button. When the grid is loaded at the first time you can press the cancel buttons and you will see a popup windows. But when you press LoadGrid button again, the grid will be reload but the popup doesn´t work. If you press the button Add Event the trigger will be reasigned and the popup works again. I don´t understand, why the trigger parameter in the jqm doesn´t work when the grid is reloaded, but the jqmAddTrigger() works without problems ? if I use the code in this manner, the popup work the first time: script language=javascript type=text/javascript var reloadnumber = 0; function getGrid() { $.get(Grid.aspx, { reloadcounter: reloadnumber }, function(data) { $(#grid-information).html(data); registerPopUp(); }); reloadnumber++; } function registerPopUp() { $('#popup-info').jqm({ trigger: 'a.linkcancel', modal: true, overlay: 50 }); } function AddEvent() { $(#popup-info).jqmAddTrigger(a.linkcancel) } /script but if I use the code : script language=javascript type=text/javascript var reloadnumber = 0; function getGrid() { $.get(Grid.aspx, { reloadcounter: reloadnumber }, function(data) { $(#grid-information).html(data); registerPopUp(); }); reloadnumber++; } function registerPopUp() { $('#popup-info').jqm({ //trigger: 'a.linkcancel', modal: true, overlay: 50 }); $(#popup-info).jqmAddTrigger(a.linkcancel) } function AddEvent() { $(#popup-info).jqmAddTrigger(a.linkcancel) } /script This works always The difference is like the trigger is registered. somebody knows, why is it ? greetings
[jQuery] .onclick - Executing a function before another - Help Solve
Need the closeAll() function to execute before the div's slidedown. All divs are initially hidden, just making a check that if one is open, it must close before any new div runs. Can someone help point me in the right direction? Here is what I have so far. function closeAll() { $(.div1).slideUp('slow'); $(.div2).slideUp('slow'); $(.div3).slideUp('slow'); } $(document).ready(function() { $(.button1).click(function() { closeAll(); $(.div1).slideDown('slow'); }); $(.button2).click(function() { closeAll(); $(.div2).slideDown('slow'); }); $(.button3).click(function() { closeAll(); $(.div3).slideDown('slow'); }); }); Thanks in advance
[jQuery] Onwidow resize element width
Hey i am trying to create a plugin that changes the css of a div according to size of window. I cant use a % based layout because it causes a gap in the layout that i dont like. a small description of the script would be something like this: windowwidth = 1000px calculation = 1000(windowwidth) - 300 (this is for columns) / 150(this is for child elemnts that fit div) = 4.66(answer from this sample data) if calculation = 4 (use integer only) then element width = 600px if calculation = 5 then element width = 752px if calculation = 6 then element width = 904px and so on. I don't have much knowledge with writing my own scripts only the basics of taking premade scripts and modifying them to my needs so if someone can help me with this it will be much appreciated. here is a tutorial that might be of help with this. http://net.tutsplus.com/videos/screencasts/learn-how-to-create-a-jquery-plugin/ Thanks, dP
[jQuery] replace existing div with fadeIn
Hi, I am trying to create a simple menu. Here is what I am trying to accomplish. When you click a link from a li list a div fades in on top of the list. When you click another link from the list I want previously faded in div to be replaced by new div. What I have now is all the links fades in randomly. Here is the code I have. $(.rs-salads).click(function(){ $(#salad-panel).fadeIn(slow); }); $(.rs-soups).click(function(){ $(#soup-panel).fadeIn(slow); }); How should I change the code that does what I want. I have nine links on my list. Thank you very much in advance for the help. Jan
[jQuery] Problem how to set left value for top navigation menu
Hi All, I would like to ask how will I set the left value of my currently selected list. such that: var a = getViewportWidth(); var b = getMouseXPosition(e); var list_width = 150; var c = b + list_width; if(c a) { //HOW TO: CODE FOR ADJUSTING LEFT VALUE OF SELECTED LIST }else{ //NO CHANGES TO BE DONE HERE. } [IMG]http://i605.photobucket.com/albums/tt139/borgymanotoy/problem.gif [/IMG]
[jQuery] Re: Problems with JQuery Cycle Plugin and IE6
This is exactly what I needed. Had no idea what was going on when the slide mysteriously had a background color that matches a div three levels up in the hierarchy. I guess there's no fix for the lack of transparency with this attribute set? On May 11, 1:37 pm, Maksym Melnyk momel...@gmail.com wrote: Here's the solution from the Mike Alsup. Hi Shane, There are two cleartype options in Cycle, and unfortunately one of them is not documented (yet). The general purpose of the cleartype logic in Cycle is to workaround a rendering issue in IE when cleartype is enabled on the system. When a Windows machine has cleartype enabled, IE6/7 render text aliased when there is an opacity filter applied to an element. In IE6, the effects of this can be greatly minimized if the element in question has an explicit background color. When Cycle's 'cleartype' option is true the plugin will attempt to set a background color on all of the slides to provided better antialiasing support on IE6. To determine the best bg color, the plugin walks up the parent hierarchy until it finds a parent with a non-transparent background color. If it doesn't find one then it uses white. In addition, when the cleartype option is true the plugin will always try to remove the opacity filter after the transition completes, this fixes the aliased text on IE7. Since Cycle is used in many, many different environments I realized that there are some cases in which setting a specific background color is not desirable. A long time ago I added an option called 'cleartypeNoBg'. When this option is true Cycle will *not* set a background color on the slide elements (but it will still remove the opacity filter after each slide transition). In Internet Explorer the default value of Cycle's 'cleartype' option is true in recent versions of the plugin. So to use the undocumented option you would do this: $('#slideshow').cycle({ cleartypeNoBg: true }); Hope this helps with the problem you're having. Mike On May 8, 11:03 pm, Chris weonlyhavesoluti...@googlemail.com wrote: Hi, I am having a problem with IE6 and thecycleplugin. In IE6 it shows a black background over my div background image (I set via css a background image to a master div). cleartype set to false, cleartypeNoBg to true. I am cycling transparent png images. In IE7+ and Firefox everything is ok. Any tip? Thanks Chris
[jQuery] Hiding a menu in Superfish
Hi, I want to make a dynamic menu where the items being shown depends on the access of the user. I tried having a code in codebehind of my aspx page that will set a certain li to style display none, but when viewed in IE6 I get a white space within the menu.
[jQuery] Best book to learn jQuery?
Just wondering what your opinions are on the best book out there, for a beginner, to learn jQuery? I know HTML and CSS well enough, but have no javascript knowledge. Thanks
[jQuery] Re: What's the best way to replace text in a node?
You can use either: $(selector).text(New text); Or $(selector).html(New text); Both also work as getters if you don't provide an argument: theText = $(selector).text(); theHTML = $(selector).html(); Is this what you were after? Regards, Michael Price -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of George Sent: 18 May 2009 12:09 To: jQuery (English) Subject: [jQuery] Re: What's the best way to replace text in a node? Sorry, folks, I'm not using remove(), I'm using empty() - like this: JQUERY p id='dText'text to be replaced/p $('#dText').empty().append('New text string') On May 18, 12:02 pm, George george.bea...@googlemail.com wrote: I'm guessing this should be a simple one for the jQuery stalwarts here. I've recently moved over from Protoype and was used to using the update() function to replace text within a node - something like this: PROTOTYPE p id='dText'text to be replaced/p $('dText').update('New text string') JQUERY p id='dText'text to be replaced/p $('#dText').remove().append('New text string') Now it appears to me that in jQuery, there isn't an out of the box function to replace the contents of a node without also replacing the node too, hence the reason I am chaining remove() and append(). Is there a better way to achieve this? Many thanks George
[jQuery] Re: What's the best way to replace text in a node?
That's what I was after - knew jQuery wouldn't disappoint! Many thanks George On May 18, 1:08 pm, Michael Price m...@edwardrobertson.co.uk wrote: You can use either: $(selector).text(New text); Or $(selector).html(New text); Both also work as getters if you don't provide an argument: theText = $(selector).text(); theHTML = $(selector).html(); Is this what you were after? Regards, Michael Price -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of George Sent: 18 May 2009 12:09 To: jQuery (English) Subject: [jQuery] Re: What's the best way to replace text in a node? Sorry, folks, I'm not using remove(), I'm using empty() - like this: JQUERY p id='dText'text to be replaced/p $('#dText').empty().append('New text string') On May 18, 12:02 pm, George george.bea...@googlemail.com wrote: I'm guessing this should be a simple one for the jQuery stalwarts here. I've recently moved over from Protoype and was used to using the update() function to replace text within a node - something like this: PROTOTYPE p id='dText'text to be replaced/p $('dText').update('New text string') JQUERY p id='dText'text to be replaced/p $('#dText').remove().append('New text string') Now it appears to me that in jQuery, there isn't an out of the box function to replace the contents of a node without also replacing the node too, hence the reason I am chaining remove() and append(). Is there a better way to achieve this? Many thanks George
[jQuery] Re: cycle plugin not working
head script type=text/javascript src=/jquery/cycle.js/script script type=text/javascript src=/jquery/jquery-1.3.2.min.js/ script This is backwards. You need to include jquery before you include the cycle plugin. On May 18, 1:31 am, surreal5335 surrea...@hotmail.com wrote: I am trying to use the cycle plugin but all I get is a static list. I have checked to make sure all my code is matching with the demos online and still I dont get anywhere. I have loaded this code inside the .ready function $('#s1').cycle({ fx: 'fade', speed: 'fast', timeout: 0, next: '#next2', prev: '#prev2' }); This part has been loaded into the body tag obviously. div id=s1 class=pics img src=/photo_site/pictures/bee.png alt=1a height=400 width=600/ img src=/photo_site/pictures/Bridge.jpg alt=1b height=400 width=600/ img src=/photo_site/pictures/Cat.jpg alt=1c height=400 width=600/ img src=/photo_site/pictures/desert.jpg alt=1d height=400 width=600/ img src=/photo_site/pictures/France.jpg alt=1e height=400 width=600/ img src=/photo_site/pictures/House.jpg alt=1f height=400 width=600/ /div This part has been loaded into the body tag obviously. The page containing the code is: http://royalvillicus.com/photo_site/...e/photo_1.html The images are shown at the bottom Thanks a lot for all your help
[jQuery] accesing array/variables with a function
Hello I'm having problems with the following code: for (var i = 0; i images.length; i++) { var img = new Image(); img.src = images[i][0]; $(img).bind('load', function() { stack.push( $('a/').attr('href', images[i][1]).append(this)[0] ); }); } The problems seems to be because stack.push cannot access images[i][1] which is a two-dimensional array, defined after/in $(document).ready (function(). The error I get: images[i] is undefined [Break on this error] stack.push( $('a/').attr('href', images[i] [1]).append(this)[0] ); event is not defined [Break on this error] stack.push( $('a/').attr('href', images[i] [1]).append(this)[0] ); If I replace images[i][1] with the value such as 'somelink.htm' it will work just fine. What am I doing wrong? Thanks a lot for help!
[jQuery] Re: .onclick - Executing a function before another - Help Solve
what about adding a class to the open div's. like this: $(.button1).click(function() { if($(div).hasClass(open)) { $(.open).removeClass(open).slideUp('slow', function() { $(.div1).addClass(open).slideDown('slow'); }); } else { $(.div1).addClass(open).slideDown('slow'); } }); On 18 Mai, 03:16, MattLewisDesign digitalmle...@gmail.com wrote: Need the closeAll() function to execute before the div's slidedown. All divs are initially hidden, just making a check that if one is open, it must close before any new div runs. Can someone help point me in the right direction? Here is what I have so far. function closeAll() { $(.div1).slideUp('slow'); $(.div2).slideUp('slow'); $(.div3).slideUp('slow'); } $(document).ready(function() { $(.button1).click(function() { closeAll(); $(.div1).slideDown('slow'); }); $(.button2).click(function() { closeAll(); $(.div2).slideDown('slow'); }); $(.button3).click(function() { closeAll(); $(.div3).slideDown('slow'); }); }); Thanks in advance
[jQuery] Re: Hiding a menu in Superfish
Did it, instead of using display none I instead used jquery remove function instead. On May 17, 6:38 pm, joems joemer...@gmail.com wrote: Hi, I want to make a dynamic menu where the items being shown depends on the access of the user. I tried having a code in codebehind of my aspx page that will set a certain li to style display none, but when viewed in IE6 I get a white space within the menu.
[jQuery] Re: [autocomplete] Can I validate and update the entered value before doing the search?
On 5/18/09 2:57 AM, ulf.ren...@gmail.com ulf.ren...@gmail.com wrote: My best though right now is to patch the plugin to include another option - substituteValue - which could be a function that validates and rewrites the data in any desired way before the match is done. i've thought in the past that a useful feature of the plugin would be an option to specify a general purpose search handler function. the plugin would call this handler when it has a search key that it wants suggestions for (either local or ajax search). it's a similar idea.
[jQuery] Re: Best book to learn jQuery?
I always recommend jQuery in Action it's a great read On May 18, 3:19 am, alex boba...@googlemail.com wrote: Just wondering what your opinions are on the best book out there, for a beginner, to learn jQuery? I know HTML and CSS well enough, but have no javascript knowledge. Thanks
[jQuery] Re: I'll Donate $20USD to Jquery if you can teach me how to do this
jQuery selectors take an optional 2nd parameter to provide a search context (object to search through). Pretty minor but it reduces the code nicely... you can get rid of the 3 find()'s. var time = $('time',this).text(); var dj = $('dj',this).text(); var showname = $('showname',this).text(); Docs about it are here: http://docs.jquery.com/Core/jQuery#expressioncontext -Wick http://www.CarComplaints.com On May 17, 8:43 pm, comslash.com comsl...@gmail.com wrote: $(function(){ $.ajax({ type: GET, url: test.xml, dataType: xml, success: function(data){ $('day[name=Monday]show', data).each(function(){ time = $(this).find('time').text(); dj = $(this).find('dj').text(); showname =$(this).find('showname').text(); $('body').append(time + 'br /' + dj + 'br /' + showname + 'br /br /'); }); } }); });
[jQuery] Re: Best book to learn jQuery?
I've heard Learning jQuery 1.3 is a great read, too. ;-) --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On May 18, 2009, at 9:07 AM, MorningZ wrote: I always recommend jQuery in Action it's a great read On May 18, 3:19 am, alex boba...@googlemail.com wrote: Just wondering what your opinions are on the best book out there, for a beginner, to learn jQuery? I know HTML and CSS well enough, but have no javascript knowledge. Thanks
[jQuery] Re: Best book to learn jQuery?
On Mon, May 18, 2009 at 8:35 AM, Karl Swedberg k...@englishrules.com wrote: I've heard Learning jQuery 1.3 is a great read, too. ;-) HAHAHA... I think you forgot your disclaimer. :p Karl is a co-author of Learning jQuery. Nonetheless, Learning jQuery 1.3 would be a great choice. :) -- Brandon Aaron
[jQuery] $.load() doesn't fires script tags?
Hi Guys, just facing an issue: I'm creating a worklflow for my app and found $.load() very usefull. It works except that script / tags aren't loaded. I got some jQuery Objects (like Flexbox etc) in my remote pages and would like to have access to this objects after the load() but after load() there are no script / tags sadly. Is this a regular behaviour? Or a bug? Regards
[jQuery] Re: How to animate background images or background of div
bump
[jQuery] Re: How to animate background images or background of div
you mean like like fadeIn() and fadeOut() ? On May 14, 5:27 pm, g10tto cteague1...@gmail.com wrote: I'm putting together a portfolio site and I'd like to use high-res images that take up most of the screen to show different works. There would be a menu bar with links to each work, where a click on that work's link would change the background by doing a standard dissolve effect. I have seen many different plugins for rotating images and changing background colors at the click of a button. Is there a method specifically for this purpose? As an alternative to altering the background-image of the body itself, I would be willing to use a properly sized div (or div's) to achieve this effect. Help appreciado! Thanks!
[jQuery] Re: How to animate background images or background of div
i may be completely misunderstanding you, but have you tried to combine a fadeOut() on the first image then a fadeIn() on the next image? you can change the background-color of a div with $('#yourDiv').css (background-color, newColour) or if you're feeling fruity you can layer the 2 images up and fade one out as you fade the other one in or whatever. On May 18, 3:21 pm, g10tto cteague1...@gmail.com wrote: bump
[jQuery] Re: remove() method IE 7 ERROR
monday morning mate, i completely misread what you wrote :| it's a bug i guess, have you tried to bypass the remove() method? eg. pDialog.parentNode.removeChild(pDialog); On May 18, 12:17 pm, snakebit bozhidar...@gmail.com wrote: I'm little confused. Why you think I want to remove a string? What I'm doing is with find('PDialog') to access the PDialog node and after that to remove it. On 18 Май, 13:01, ryan.j ryan.joyce...@googlemail.com wrote: remove() will remove an object from the DOM, but essentially you're just trying to remove part of a string aren't you? maybe try replace()? On May 18, 9:42 am, snakebit bozhidar...@gmail.com wrote: Hi, I have an ajax request which is returning an xml, but when I tray to remove an element from the xml response I'm receiving the following error message: This is happening only in IE7 (I didn't tray in IE6) Line: 1283 EROOR: Object doesn't support this property or method This is my code: var pDialog = $(data_responce).find('PDialog'); if(pDialog ){ pDialog .remove(); } This is what I find in 1283 when i debugged it : // Compute a unique ID for the element if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name !jQuery.cache[ id ] ) jQuery.cache[ id ] = {};
[jQuery] Re: I'll Donate $20USD to Jquery if you can teach me how to do this
I'll second the JSON suggestion. Assuming from your XML code example that you're only ever going to have day/show nodes, here's the JSON: { 'Monday' : [ { time : 0800-1000, dj : mc funk, name : nonstop music }, { time : 1000-1200, dj : mc rap, name : nonstop music } ], 'Tuesday' : [ { time : 0800-1000, dj : mc stoner, name : nonstop music }, { time : 1000-1200, dj : mc ambient, name : nonstop music } ] } The Javascript code looks like $(function() { $.ajax({ url:'test.php', dataType:'json', success:function(schedule) { for (var day in schedule) { $('body').append('h3' + day + '/h3'); for (var i = 0; i schedule[day].length; i++) { var s = schedule[day][i]; $('body').append('p' + s.time + 'br /' + s.dj + 'br /' + s.name + '/p'); } } }, error:function(r,t,e) { alert(t); } }); }); Hope that helps .. JSON is about as lightweight as it gets. -Wick http://www.CarComplaints.com On May 18, 3:21 am, Josh Powell seas...@gmail.com wrote: If you aren't forced to use XML, look at trying JSON instead. It is a MUCH friendlier format for passing information around.
[jQuery] Re: Best book to learn jQuery?
Damn, I missed the memo that there was a 1.3 version out and about ! On May 18, 9:35 am, Karl Swedberg k...@englishrules.com wrote: I've heard Learning jQuery 1.3 is a great read, too. ;-) --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On May 18, 2009, at 9:07 AM, MorningZ wrote: I always recommend jQuery in Action it's a great read On May 18, 3:19 am, alex boba...@googlemail.com wrote: Just wondering what your opinions are on the best book out there, for a beginner, to learn jQuery? I know HTML and CSS well enough, but have no javascript knowledge. Thanks
[jQuery] Re: Best book to learn jQuery?
Are there any problems when jQuery is updated, or is it solely no information about new effects and stuff? I've only been using jQuery for a couple of weeks, are new releases frequent? On May 18, 2:35 pm, Karl Swedberg k...@englishrules.com wrote: I've heard Learning jQuery 1.3 is a great read, too. ;-) --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On May 18, 2009, at 9:07 AM, MorningZ wrote: I always recommend jQuery in Action it's a great read On May 18, 3:19 am, alex boba...@googlemail.com wrote: Just wondering what your opinions are on the best book out there, for a beginner, to learn jQuery? I know HTML and CSS well enough, but have no javascript knowledge. Thanks
[jQuery] Re: How to animate background images or background of div
i may be completely misunderstanding you, but have you tried to combine a fadeOut() on the first image then a fadeIn() on the next image? you can change the background-color of a div with $('#yourDiv').css(background-color, newColour) but that will just change it, it won't fade it gradually on it's own. or if you're feeling fruity you can layer the 2 images up and fade one out to reveal the other one or whatever. you'd probably want to change the src of the new img.inactive to point to the next image, switch their classes between active to inactive, with active having the higher z-index and .inactive being hidden. something like that should do the trick, anyway. On May 18, 3:21 pm, g10tto cteague1...@gmail.com wrote: bump
[jQuery] Re: Best book to learn jQuery?
A look through http://docs.jquery.com/History_of_jQuery may help answer both questions. Dot releases (1.1, 1.2, 1.3) can contain new features and API changes that can require code updates, but it's always well documented, as you can see by clicking on a few links on that page, that take you to release notes. Minor releases (1.2.1, 1.2.2, 1.2.3, 1.3.1, 1.3.2) typically would contain only critical bug fixes, without affecting anything else. - Richard On Mon, May 18, 2009 at 10:44 AM, alex boba...@googlemail.com wrote: Are there any problems when jQuery is updated, or is it solely no information about new effects and stuff? I've only been using jQuery for a couple of weeks, are new releases frequent? On May 18, 2:35 pm, Karl Swedberg k...@englishrules.com wrote: I've heard Learning jQuery 1.3 is a great read, too. ;-) --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On May 18, 2009, at 9:07 AM, MorningZ wrote: I always recommend jQuery in Action it's a great read On May 18, 3:19 am, alex boba...@googlemail.com wrote: Just wondering what your opinions are on the best book out there, for a beginner, to learn jQuery? I know HTML and CSS well enough, but have no javascript knowledge. Thanks
[jQuery] Re: Best book to learn jQuery?
they have a blog on the official site, which details changes to jquery and any updates to popular/interesting plugins http://blog.jquery.com/ On May 18, 3:44 pm, alex boba...@googlemail.com wrote: Are there any problems when jQuery is updated, or is it solely no information about new effects and stuff? I've only been using jQuery for a couple of weeks, are new releases frequent? On May 18, 2:35 pm, Karl Swedberg k...@englishrules.com wrote: I've heard Learning jQuery 1.3 is a great read, too. ;-) --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On May 18, 2009, at 9:07 AM, MorningZ wrote: I always recommend jQuery in Action it's a great read On May 18, 3:19 am, alex boba...@googlemail.com wrote: Just wondering what your opinions are on the best book out there, for a beginner, to learn jQuery? I know HTML and CSS well enough, but have no javascript knowledge. Thanks
[jQuery] Re: Validate textbox on option selected value
Are you using the validation plugin? On 18 maio, 05:33, ciupaz luigi.zambe...@gmail.com wrote: Hi all, I have this validate code to validate a textbox if the user select a combo value: script type=text/javascript $(document).ready(function() { $(form#2form).validate({ rules: { viaAltro: { required: #AltraVia:checked } }, messages: { viaAltro: { required: Insert 'Altra via' } } }) }); /script and this is the HTML: select name=viaFornitura id=viaFornitura optionSeleziona la via/option option id=AltraViaAltro/option /select label for=viaAltroAltra via/label input name=viaAltro id=viaFornituraAltro type=text / but it doesn't work. Where the problem? Thanks a lot. Luigi
[jQuery] Re: Best book to learn jQuery?
Yes, but because he has no JS he will like have a tough time. I would read a basic JS book first, then go for Learning jQuery 1.3. Mike On May 18, 8:35 am, Karl Swedberg k...@englishrules.com wrote: I've heard Learning jQuery 1.3 is a great read, too. ;-) --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On May 18, 2009, at 9:07 AM, MorningZ wrote: I always recommend jQuery in Action it's a great read On May 18, 3:19 am, alex boba...@googlemail.com wrote: Just wondering what your opinions are on the best book out there, for a beginner, to learn jQuery? I know HTML and CSS well enough, but have no javascript knowledge. Thanks
[jQuery] Internet Explorer OMG
I have a function caps = []; /* some array */ function activate() { var index = parseInt(Math.random() * caps.length); if( caps.length 0) { caps[index].addClass(active); $(#tip).html(caps[index].html()); } else { win(); } $(a.active).bind(click, function() { var cap = $(this); $(this).fadeOut(fast, function() { cap.replaceWith(); }); caps.splice(index, 1); activate(); return false; }); return; } it's simple when you click on A tag with active class something is happing. The problem is that ONLY Internet Explorer calls this function recursively in infinite loop, why??? Lost half of the day.
[jQuery] Web dev problem face to face with JAVA J2EE Dev's
Hi all, my problem is quite, I have to admit it, confusing. My client has a couple of JAVA hardcore coders, but obviously none of them understands the concept of ajax (not so hardcore now, huh ? ...). As myself am not confident with the JAVA/J2EE/STRUTS concepts, I'm trying to find out a way to explain to them what I need as an output from a request for Jquery to work with. In simple words, what do they need to output for my client-side Jquery scripts to understand, and how do they format server's answers ? Ah... the gap between a webdev rookie and J2EE dev's...
[jQuery] jquery: display external page inside popups (mail goggles)
Hi, I've been through various jQuery windows popups (modal, fancybox,boxy, à la facebook ...) but none of them convinced me. I want to display inside the popup php/html file not images. I really like the modal style but it displays only javascript files. My goal is to have kind of mail goggles popup. The user can't disclose it if he clicks outside of the window. Raymond
[jQuery] Re: Validate textbox on option selected value
Are you using the validation plugin? On 18 maio, 07:33, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Try this (untested): required: #viaFornitura[selectedIndex=1] Jörn On Mon, May 18, 2009 at 12:13 PM, ciupaz luigi.zambe...@gmail.com wrote: How can I make this Jorn? Luigi On May 18, 10:42 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: select-options don't have a checked property. You have to fix the selector #AltraVia:checked. Jörn On Mon, May 18, 2009 at 10:33 AM, ciupaz luigi.zambe...@gmail.com wrote: Hi all, I have this validate code to validate a textbox if the user select a combo value: script type=text/javascript $(document).ready(function() { $(form#2form).validate({ rules: { viaAltro: { required: #AltraVia:checked } }, messages: { viaAltro: { required: Insert 'Altra via' } } }) }); /script and this is the HTML: select name=viaFornitura id=viaFornitura optionSeleziona la via/option option id=AltraViaAltro/option /select label for=viaAltroAltra via/label input name=viaAltro id=viaFornituraAltro type=text / but it doesn't work. Where the problem? Thanks a lot. Luigi- Hide quoted text - - Show quoted text -
[jQuery] [validate] - disabling focusInvalid for a given element
Group, I'm putting together a form using the Validate plugin, and have run into an issue it would be nice to resolve. My issue Is around the focusInvalid option. I'd like to disable the focusInvalid behavior for a particular element, yet keep it enabled for the rest. Is this possible? Any help or input you could provide would be appreciated. thanks Steve
[jQuery] Re: Validate textbox on option selected value
Are you using the validation plugin? On 18 maio, 07:33, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Try this (untested): required: #viaFornitura[selectedIndex=1] Jörn On Mon, May 18, 2009 at 12:13 PM, ciupaz luigi.zambe...@gmail.com wrote: How can I make this Jorn? Luigi On May 18, 10:42 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: select-options don't have a checked property. You have to fix the selector #AltraVia:checked. Jörn On Mon, May 18, 2009 at 10:33 AM, ciupaz luigi.zambe...@gmail.com wrote: Hi all, I have this validate code to validate a textbox if the user select a combo value: script type=text/javascript $(document).ready(function() { $(form#2form).validate({ rules: { viaAltro: { required: #AltraVia:checked } }, messages: { viaAltro: { required: Insert 'Altra via' } } }) }); /script and this is the HTML: select name=viaFornitura id=viaFornitura optionSeleziona la via/option option id=AltraViaAltro/option /select label for=viaAltroAltra via/label input name=viaAltro id=viaFornituraAltro type=text / but it doesn't work. Where the problem? Thanks a lot. Luigi- Hide quoted text - - Show quoted text -
[jQuery] Re: remove() method IE 7 ERROR
I know the feeling :) my temporary solution is almost the same as yours: var pDialog = data_responce.getElementsByTagName(PDialog); data_responce.documentElement.removeChild(pDialog[0]) On 18 Май, 17:13, ryan.j ryan.joyce...@googlemail.com wrote: monday morning mate, i completely misread what you wrote :| it's a bug i guess, have you tried to bypass the remove() method? eg. pDialog.parentNode.removeChild(pDialog); On May 18, 12:17 pm, snakebit bozhidar...@gmail.com wrote: I'm little confused. Why you think I want to remove a string? What I'm doing is with find('PDialog') to access the PDialog node and after that to remove it. On 18 Май, 13:01, ryan.j ryan.joyce...@googlemail.com wrote: remove() will remove an object from the DOM, but essentially you're just trying to remove part of a string aren't you? maybe try replace()? On May 18, 9:42 am, snakebit bozhidar...@gmail.com wrote: Hi, I have an ajax request which is returning an xml, but when I tray to remove an element from the xml response I'm receiving the following error message: This is happening only in IE7 (I didn't tray in IE6) Line: 1283 EROOR: Object doesn't support this property or method This is my code: var pDialog = $(data_responce).find('PDialog'); if(pDialog ){ pDialog .remove(); } This is what I find in 1283 when i debugged it : // Compute a unique ID for the element if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name !jQuery.cache[ id ] ) jQuery.cache[ id ] = {};
[jQuery] Re: How to display additional text along with link
Thanks. This helped reduce the code but still not perfect. Here is my present code which works but still I cannot eliminate some redundant code. $(a[href$='.doc']:not(a[href^='http']),a[href$='.xls']:not(a [href^='http']),a[href$='.ppt']:not(a[href^='http']),a[href $='.pdf']:not(a[href^='http']),a[href$='.mpg']:not(a [href^='http'])).each(function(){ var ext=$(this).attr(href).match(/\.[^\.]*$/); if (ext) $(this).after($('span/').attr ('class','fileExtension').html( ( + ext + ) )); } ); I have modified your code as I was getting errors due to a variety of links on my page (links with neither url value for href nor any extension etc.,). In the above code as you see I had to append :not(a[href^='http']) to all different kinds of file extensions I am interested in. I tried the following to eliminate the redundant code but it does not work. $(a:not[href^='http']).find(a[href$='.doc'],a[href$='.docx'],a[href $='.xls'],a[href$='.xlsx'],a[href$='.ppt'],a[href$='.pptx'],a[href $='.pdf'],a[href$='.mpg']).each(function(){ var ext=$(this).attr(href).match(/\.[^\.]*$/); if (ext) $(this).after($('span/').attr ('class','fileExtension').html( ( + ext + ) )); } ); Thanks On May 15, 11:31 am, Jason Persampieri papp...@gmail.com wrote: Is this what you're looking for? $(a:not[href^=http]).each(function(){ var ext=$(this).attr(href).match(/\.[^\.]*$/); if (ext) $(this).after(span class='fileExtension'(+ext.slice (1)+)/span); } ); On May 15, 8:09 am, infoaddicted jack.lapla...@gmail.com wrote: This calls for a function, where you can hide the gory details. Use a selector to gather up the a elements, and pass that as the argument to the function. pseudocode: var linksToChange = JQuery Selector; function changeLinks( linksToChange ){ either: a for loop to step through the object links ToChangelike an array probably an if conditional in every iteration see:http://tinyurl.com/3sdkgl also check out jquery's .each() iterator in the Utilities section of the docs or: a switch statement see:http://tinyurl.com/osezq2 } On May 14, 3:18 pm, vmrao maheshpav...@gmail.com wrote: OK. I was able to add the text as well as apply special style to it using the following code. $(a[href$='.doc']:not(a[href^='http'])).after($('span/').attr ('class','fileExtension').html( ( + '.doc' + ) )); $(a[href$='.docx']:not(a[href^='http'])).after($('span/').attr ('class','fileExtension').html( ( + '.docx' + ) )); $(a[href$='.xls']:not(a[href^='http'])).after($('span/').attr ('class','fileExtension').html( ( + '.xls' + ) )); $(a[href$='.xlsx']:not(a[href^='http'])).after($('span/').attr ('class','fileExtension').html( ( + '.xlsx' + ) )); $(a[href$='.ppt']:not(a[href^='http'])).after($('span/').attr ('class','fileExtension').html( ( + '.ppt' + ) )); $(a[href$='.pptx']:not(a[href^='http'])).after($('span/').attr ('class','fileExtension').html( ( + '.pptx' + ) )); $(a[href$='.pdf']:not(a[href^='http'])).after($('span/').attr ('class','fileExtension').html( ( + '.pdf' + ) )); $(a[href$='.mpg']:not(a[href^='http'])).after($('span/').attr ('class','fileExtension').html( ( + '.mpg' + ) )); However, I am not sure if there is scope to minimize the above code (as you see one line for every file extension). On May 14, 2:42 pm, vmrao maheshpav...@gmail.com wrote: I think it is not clear. Here is my code. $(a[href$='.doc']).after( ( + '.doc' + ) ); $(a[href$='.docx']).after( ( + '.docx' + ) ); $(a[href$='.xls']).after( ( + '.xls' + ) ); $(a[href$='.xlsx']).after( ( + '.xlsx' + ) ); $(a[href$='.ppt']).after( ( + '.ppt' + ) ); $(a[href$='.pptx']).after( ( + '.pptx' + ) ); $(a[href$='.pdf']).after( ( + '.pdf' + ) ); $(a[href$='.mpg']).after( ( + '.mpg' + ) ); I would like to know if it is possible to have a one-line code which replaces all the above code. Also, for the extra text (ex: .doc) being added, I need to add a special CSS style. I tried this and it does not work. $(a[href$='.doc']).after( ( + '.doc' + ) ).addClass (fileExtension); On May 14, 2:00 pm, waseem sabjee waseemsab...@gmail.com wrote: here i modified my code for class adding var obj = $(a); for(var i = 0; i obj.length; i++) { obj.eq(i).wrap(span/span ); // wrap the hyperlink in a span tag obj.parent().eq(i).prepend('span class=beforeThis is text before the hyperlink/span'); obj.parent().eq(i).append('span class=afterThis is text after the hyperlink/span'); } On Thu, May 14, 2009 at 7:58 PM, waseem sabjee waseemsab...@gmail.comwrote: var obj = $(a); for(var i = 0; i obj.length; i++) { obj.eq(i).wrap(span/span); // wrap the hyperlink in a span tag obj.parent().eq(i).prepend(This is text before the hyperlink);
[jQuery] Events - Live -v- Livequery
Hi all, I normally do this with livequery: $('.mylink').livequery(function(event) { $(this).mycustomFunction(); }); So any new .mylink's on a page would also be bound with my custom function. How can I do this with the new LIVE event? or is it even possible? Thanks in advance!
[jQuery] Re: Cross Port Jquery Library Call
In case anyone stumbles in here with the same issue, I was able to solve this pretty easily... As long as your library includes aren't port specific, and your $.post () url is pointing to the port you need (http(s)) then, there won't be any problems. Your library call should be something like this: script type=text/ javascript src=/scripts/js/jquery-1.3.2.js/script hope it helps someone...
[jQuery] Re: Onwidow resize element width
might not help but i did those window resize once for one of my objects. was always at the right place after resize. $(window).resize(function() { //footer var leftabstand = $(.footer_08).offset(); var width = $(.footer_08).width(); var left= leftabstand.left + width; $(.footers).css(left,left); }); On 18 Mai, 03:07, dPO dporigin...@gmail.com wrote: Hey i am trying to create a plugin that changes the css of a div according to size of window. I cant use a % based layout because it causes a gap in the layout that i dont like. a small description of the script would be something like this: windowwidth = 1000px calculation = 1000(windowwidth) - 300 (this is for columns) / 150(this is for child elemnts that fit div) = 4.66(answer from this sample data) if calculation = 4 (use integer only) then element width = 600px if calculation = 5 then element width = 752px if calculation = 6 then element width = 904px and so on. I don't have much knowledge with writing my own scripts only the basics of taking premade scripts and modifying them to my needs so if someone can help me with this it will be much appreciated. here is a tutorial that might be of help with this.http://net.tutsplus.com/videos/screencasts/learn-how-to-create-a-jque... Thanks, dP
[jQuery] Re: remove() method IE 7 ERROR
i'd actually be tempted to try... try { pDialog.remove(); } catch(e) { /* console.log(remove method failed); */ pDialog.parentNode.removeChild(pDialog); } ...which isn't very pretty but it should start working properly as soon as somebody gets around to fixing remove() without needing the code to be changed straight away. On May 18, 3:55 pm, snakebit bozhidar...@gmail.com wrote: I know the feeling :) my temporary solution is almost the same as yours: var pDialog = data_responce.getElementsByTagName(PDialog); data_responce.documentElement.removeChild(pDialog[0]) On 18 Май, 17:13, ryan.j ryan.joyce...@googlemail.com wrote: monday morning mate, i completely misread what you wrote :| it's a bug i guess, have you tried to bypass the remove() method? eg. pDialog.parentNode.removeChild(pDialog); On May 18, 12:17 pm, snakebit bozhidar...@gmail.com wrote: I'm little confused. Why you think I want to remove a string? What I'm doing is with find('PDialog') to access the PDialog node and after that to remove it. On 18 Май, 13:01, ryan.j ryan.joyce...@googlemail.com wrote: remove() will remove an object from the DOM, but essentially you're just trying to remove part of a string aren't you? maybe try replace()? On May 18, 9:42 am, snakebit bozhidar...@gmail.com wrote: Hi, I have an ajax request which is returning an xml, but when I tray to remove an element from the xml response I'm receiving the following error message: This is happening only in IE7 (I didn't tray in IE6) Line: 1283 EROOR: Object doesn't support this property or method This is my code: var pDialog = $(data_responce).find('PDialog'); if(pDialog ){ pDialog .remove(); } This is what I find in 1283 when i debugged it : // Compute a unique ID for the element if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name !jQuery.cache[ id ] ) jQuery.cache[ id ] = {};
[jQuery] Re: Events - Live -v- Livequery
i'm pretty sure you can only bind event handlers with .live, so you'd need to link it to a click or something. On May 18, 3:58 pm, Meander365 aarron.pain...@gmail.com wrote: Hi all, I normally do this with livequery: $('.mylink').livequery(function(event) { $(this).mycustomFunction(); }); So any new .mylink's on a page would also be bound with my custom function. How can I do this with the new LIVE event? or is it even possible? Thanks in advance!
[jQuery] Re: Events - Live -v- Livequery
Only Live Query supports calling a function when an element is matched (or unmatched). If you need this functionality, then you'll need to stick with Live Query. -- Brandon Aaron On Mon, May 18, 2009 at 9:58 AM, Meander365 aarron.pain...@gmail.com wrote: Hi all, I normally do this with livequery: $('.mylink').livequery(function(event) { $(this).mycustomFunction(); }); So any new .mylink's on a page would also be bound with my custom function. How can I do this with the new LIVE event? or is it even possible? Thanks in advance!
[jQuery] JQUERY Pagination
Hi all, Please refer few jquery pagination plugins , Also need in the able heading with sort type , for example Assume if i click the date , then i want sort by date , if i click subject , need to sort by subject , *Date* *Subject* *09-08-1984* Subject 1 *10-09-1986* Subject 2 *10-08-1996* Subject 3 Thanks -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyerphp.site88.net/bharanikumar/
[jQuery] Re: jquery: display external page inside popups (mail goggles)
Back again, I mean most method consist of hidding inside a div id=content inside the same page. Then the popup will display the what's inside the div ... Is there a way to display from an external html or php file. Tks Raymond
[jQuery] Re: Events - Live -v- Livequery
fascinating, i didn't even know you could do that... On Mon, May 18, 2009 at 11:56 AM, Brandon Aaron brandon.aa...@gmail.comwrote: Only Live Query supports calling a function when an element is matched (or unmatched). If you need this functionality, then you'll need to stick with Live Query. -- Brandon Aaron On Mon, May 18, 2009 at 9:58 AM, Meander365 aarron.pain...@gmail.com wrote: Hi all, I normally do this with livequery: $('.mylink').livequery(function(event) { $(this).mycustomFunction(); }); So any new .mylink's on a page would also be bound with my custom function. How can I do this with the new LIVE event? or is it even possible? Thanks in advance! -- Christopher Thatcher
[jQuery] Re: Internet Explorer OMG
When you call activate() inside the click handler, you add one more event listener for the click, which calls activate() again and so on. You should either not call the function from within itself or move the bind() outside. On May 18, 9:29 am, Dmitri smirnov.dmi...@gmail.com wrote: I have a function caps = []; /* some array */ function activate() { var index = parseInt(Math.random() * caps.length); if( caps.length 0) { caps[index].addClass(active); $(#tip).html(caps[index].html()); } else { win(); } $(a.active).bind(click, function() { var cap = $(this); $(this).fadeOut(fast, function() { cap.replaceWith(); }); caps.splice(index, 1); activate(); return false; }); return; } it's simple when you click on A tag with active class something is happing. The problem is that ONLY Internet Explorer calls this function recursively in infinite loop, why??? Lost half of the day.
[jQuery] Re: cycle plugin not working
Thanks a lot for pointing that out, I made the change which changed nothing sadly. I even cleared my cache and refreashed everything to get the changes to take effect, but still nothing. I am sure that was one of the problems but there seems to other problems still Could you tell me if it is working for you? Also the iframe with the feedback inside of it, where it is appearing on the page for you. ( other people seem to be seeing it on a different place than me). Thanks a lot
[jQuery] jQuery Workshop - We Want Your Input!
Hi Everyone Apologies for the intrusion, but I'm looking for your input on something. We're looking for input on a jQuery Workshop - let us know what's on your mind! Please fill out our poll at http://spreadsheets.google.com/viewform?formkey=cnN3VWxKcjNOYkZzX1lCNjgwZ29kNVE6MA when you have a moment (poll should take you only 15 seconds to complete). Thank you for your input! Sincerely, Justin Kozuch Founder, Refresh Events w: www.refresh-events.ca e: jus...@refresh-events.ca t: twitter.com/RefreshEvents
[jQuery] Re: jquery: display external page inside popups (mail goggles)
Use an iframe for that instead of div id=content use: iframe src=SomeHtmlOrPhpFile On May 18, 6:04 pm, rayche...@gmail.com rayche...@gmail.com wrote: Back again, I mean most method consist of hidding inside a div id=content inside the same page. Then the popup will display the what's inside the div ... Is there a way to display from an external html or php file. Tks Raymond
[jQuery] Re: I'll Donate $20USD to Jquery if you can teach me how to do this
I'll have to check that out... seeing i can eventually craft the data however i want to when it comes out.. But note to self and completly off conversation... Based on that example, I could use jquery to parse LUA that comes from World Of Warcraft The dataformat is very very similar. On May 18, 9:33 am, CarComplaints.com w...@autobeef.com wrote: I'll second the JSON suggestion. Assuming from your XML code example that you're only ever going to have day/show nodes, here's the JSON: { 'Monday' : [ { time : 0800-1000, dj : mc funk, name : nonstop music }, { time : 1000-1200, dj : mc rap, name : nonstop music } ], 'Tuesday' : [ { time : 0800-1000, dj : mc stoner, name : nonstop music }, { time : 1000-1200, dj : mc ambient, name : nonstop music } ] } The Javascript code looks like $(function() { $.ajax({ url:'test.php', dataType:'json', success:function(schedule) { for (var day in schedule) { $('body').append('h3' + day + '/h3'); for (var i = 0; i schedule[day].length; i++) { var s = schedule[day][i]; $('body').append('p' + s.time + 'br /' + s.dj + 'br /' + s.name + '/p'); } } }, error:function(r,t,e) { alert(t); } }); }); Hope that helps .. JSON is about as lightweight as it gets. -Wickhttp://www.CarComplaints.com On May 18, 3:21 am, Josh Powell seas...@gmail.com wrote: If you aren't forced to use XML, look at trying JSON instead. It is a MUCH friendlier format for passing information around.- Hide quoted text - - Show quoted text -
[jQuery] Re: jquery: display external page inside popups (mail goggles)
$(#content).load(newfile.php) ? rayche...@gmail.com wrote: Back again, I mean most method consist of hidding inside a div id=content inside the same page. Then the popup will display the what's inside the div ... Is there a way to display from an external html or php file. Tks Raymond No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.33/2120 - Release Date: 05/18/09 06:28:00
[jQuery] [validate] can I fool the validator into letting me submit the form?
Hi everyone - I've used and loved the form validation plugin developed by Jörn Zaefferer, and I've run into several cases in which I would like to be able to essentially say, if these conditions are met, the form's valid, period, without actually checking through valid(), element() or any other means. Is there a method I can call that just forces the validator element to think it's valid, without actually validating the form? Thanks much in advance!
[jQuery] scrollTop on jQuery object
Hi! I have to use scrollTop and scrollHeight properties, but on jQuery object it returns `undefined`. Is there any method to get this property from jq object? It doesn't matter, but my object looks like this: var $win = $(this) // div on my page var $msgs = $win.find('.msgs'); $msgs.scrollHeight returns 'undefined' Thanks, Arrviasto (Poland)
[jQuery] Ajax history/back button - with a twist
Hi folks, I have the classic ajax history/back button problem - with a twist. :-) I'm developing a simple order form using Rails and jQuery. On the top of the page there's a cart and right below it a search form for products. When the user start to type in the search box results are presented on the fly using ajax. When the user clicks on the item he/she wants it's added to the shopping cart with ajax. Now to my problem(s). If the user, after leaving the page, hits the back button he/she is presented with an empty cart - because I updated it with ajax before. Of course a browser refresh reveals the cart - because there's a new request to the web server which renders it. Thats the first problem, the second one regards the product search. If the user performed a search before leaving the page the search results are gone - because they where displayed with the help of ajax. From my Google searches I have found these plugins: * History/Remote * jquery.history.js * jQuery Address Maybe one of these solves the search problem? (if I add the search query as a hash to the url). But it doesn't solve the empty cart problem. My gut feeling tells me that these plugins are more for history when you have ajax style navigation - thats not really my case. Please correct me if I'm wrong. :-) What would be your approach in this situation? Thanks in advance. Cheers Sven Dahlstrand
[jQuery] EasySlider 1.5: Tabbing through forms
I'm developing a form using the jQuery plugin EasySlider 1.5: http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding I want to add the ability to initiate the slider action when a user tabs to a field located off-screen, as in this example: http://www.fordpas.org/registration/teachers_coordinators/form_v2.asp So, when someone tabs through that first form area, and gets to Repeat Email, when they tab to the next field, it triggers the EasySlider much like the Next span tag. Any suggestions? It has to be possible, but I haven't come up with a solution yet. Help me Obi-Wan, you're my only hope.
[jQuery] Need QuickLinks jQuery functionality as seen on NorthPoint.org at top of page
Does anyone know where I can grab jQuery code that will give me the QuickLinks functionality as seen on NorthPoint.org at the top of their web pages? When clicked it slides the pages content down to display a links menu. When mousing over the link the boxes resize to display a brief explanation in a box beside it telling the visitor what the link is for. I appreciate any help anyone can give me to find these scripts or point to a tutorial to make it happen. JonDod