Re: [jQuery] Returning Value Of aa .POST
$.ajax(), $.get(), $.post(), $.load(), none of these methods return the result of the AJAX call, because they're meant to be asynchronous (the first A in AJAX), which means they're working behind the scene, detached from the place they've been called. If they were not they would freeze the interface until the call ends, and most of the time nobody wants that. In order to execute something after the call succeeds you have to use callbacks : http://docs.jquery.com/Ajax/jQuery.post#urldatacallbacktype Michel Belleville 2009/11/26 Nuclear nymphon...@gmail.com function ajax_post_var(url, event_id) { var info = $.post(url).responseText; alert(info); if (event_id == '1') { do something with info... } ...more if's here... } Why does info show undefined... I'd like to be able to use the returned value for something else.
[jQuery] Re: csv2table
Hi, Ram You can simplify it if you can use PHP. You acquire yahoo data in following PHP and receive it in csv2table of same domain. ?php $url=http://download.finance.yahoo.com/d/quotes.csv?s= %5EIXICf=sl1d1t1c1ohgve=.csv; $data=file_get_contents($url); // for safe Tag to lt; gt; echo htmlspecialchars($data, ENT_QUOTES); ? But please be careful about security. and, csv2table HTML is follow. script src=../js/jquery-1.3.2.min.js type=text/javascript/ script script src=../js/jquery.csv2table-0.02-b-2.9.js type=text/ javascript charset=utf-8/script script $(function(){ $('#view1').csv2table({ url:'./getcsv.php', appendThead:['a','b','c','d','e','f','g','h','i'] }) }); /script div id=view1/div @see Sample: http://jsgt.org/lib/jquery/plugin/csv2table/v002/test/test.htm On 11月27日, 午後1:34, Ram naviamarkets@gmail.com wrote: Hi Toshiro Takahashi First i should say thanks to you for replying Actually i need to read data from yahoo stock quotes and show it in my website so can you guide me to get data. http://download.finance.yahoo.com/d/quotes.csv?s=%5EIXICf=sl1d1t1c1o... Pls in detail. On Nov 27, 7:10 am, tato t...@game.gr.jp wrote: By the way, the reason why csv2table cannot read the text file of the other domain is because it uses $.get method of jQuery. But I do not get along well even if I change $.get in $.getScript. When capture a TCP packet, the data body arrives,; but csv data as for the JavaScript is because is not it. The method to obtain it thought, but a person distributing json in the other domain is that it is easy first of all :p -- Toshiro Takahashihttp://plugins.jquery.com/project/csv2tablehttp://plugins.jquery.com/... On 11月27日, 午前10:49, Toshiro Takahashi t...@game.gr.jp wrote: Hi, Ram Thank you for using my plugin. On Thu, 26 Nov 2009 02:21:19 -0800 (PST) Ram naviamarkets@gmail.com wrote: I am new to jquery Its nice in csv2table i need to get values dynamically from a particular url everyminute ... i dont know how to get from particular url ( www.websitename.com?asdfasdf.csv ) and generate table for that value. Is the 'particular url' another Domain from yuor html? You cannot read the csv when that is it. If you can process the text file of the other domain, there is a method you make it json not csv, and to access. However, json does not implement it in csv2table. If get time; I may make json2table if you are necessary. $(function(){ $('#view1').csv2table('book12.csv'); }); any help will be appreciated .. -- Toshiro Takahashihttp://plugins.jquery.com/project/csv2tablehttp://plugins.jquery.com/...
Re: [jQuery] PHP jQuery on different port
The port is part of the url (80 is implicit for http), so you've got to explicitly set it to access port 8080, like this : http://whatever.yoursite.is:8080/any_script.php?any_other_argument=some_value Michel Belleville 2009/11/26 Darjana darj...@gmail.com Hello, This user.php on port 80 $callback = $_GET[callback]; $user = $_GET[username]; if($user == lazy) { $response = array(message = SUCESS); } else { $response = array(message = FAIL); } echo $callback . (. json_encode($response) . );; This is index.html on port 8080 $.getJSON(user.php?callback=?, { username: lazy}, function(json){ alert(JSON Data: + json.message); // SUCCESS }); This is working if both files on same port, however, it doesn't when its not on same port Any workaround for this to work?
Re: [jQuery] Is there a plugin similar to this Flash effect in Yahoo.com for media images?
This is not a jQuery plugin, this is flash. Though copying this effect might be possible (except maybe on Internet Explorer of course) using nothing more than a very tiny bit of JavaScript and png alpha-transparency (hence the maybe impossible on IE). You create two fading images (basically a one pixel wide gradient opaque whitetransparent white), and you jQuery two divs with these images as background with absolute positionning to place them on both sides of your target element. I'm pretty sure you'll have troubles with IE6 and maybe IE7. Regards. Michel Belleville 2009/11/26 Raymond Ho rym...@gmail.com Hi guys, I'm looking to develop this plugin in jQuery, or is there already an available version in jQuery for this effect? http://movies.yahoo.com/feature/hmg-weekend-roundup-11-25-09.html I really want the fading effect of the plugin. Please tell me. Thanks
Re: Re[jQuery] move appended element
Hi, Sorry, that was a slight typo on my part, it should be class selected. The problem I have with just appending using addClass is that when the class is removed it doesn't restore the element to it original state a such. What I mean is when the class is removed it leaves class= rather than a blank that it was before. I need to have the exact quote of the code so I can't have class=. Is there a solution to this? Thanks, Colin. coldwired wrote: Hi, I'm trying to append an div element around the element that triggers the on hover event, then remove the div on mouse out (blur). I normally would use addClass / removeClass but this leaves class= when the class is removed and not the original state of the html. Here's my code, I can't work out how to remove the appended div correctly... : jQuery(p,h1,h2,h3,span,li, dd, dt,b,em,strong).hover(function() { jQuery('div class=selected/div').append(jQuery(this).clone()).html(); active = true; }, function() { jQuery(.insense-selected).remove(); active = false; }); This doesn't work as expected, can anyone help out? A solution to either problem described would suffice! Thanks, Colin. -- View this message in context: http://old.nabble.com/Remove-appended-element-tp26534745s27240p26539951.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: $.getScript results in two requests!
Hey there, Thanks for your answers. Sorry I didn't reply earlier, been pretty busy. It turned out the problem was caused by an old version of Firebug ( http://code.google.com/p/fbug/issues/detail?id=928 ). I am now using Firebug 1.3 on Firefox 3.5, where the bug is fixed. Eric On 25 Nov., 17:03, donb falconwatc...@comcast.net wrote: Be very certain you don't accidentally bind a click function twice somehow. Assuming, that is, a click initiates the action. Setting a Firebug breakpoint on entry to the repeated code, then inspecting the Stack panel to see how you got there each time, will probably reveal how this occurs. On Nov 24, 9:50 am, Eric ikeah...@gmail.com wrote: Hey there, A $.getScript() call I am making results in two seperate requests to the server. Any chance I can avoid that? Here are the headers: GET server.file?param1=param2 HTTP/1.1 Host: server User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; de; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20 Accept: text/javascript, application/javascript, */* Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive X-Requested-With: XMLHttpRequest Referer:http://server/indexfile.html Cookie: (Cookie Contents) Followed by... GET server.file?param1=param2 HTTP/1.1 Host: server User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; de; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20 Accept: text/xml,application/xml,application/xhtml+xml,text/ html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: (Cookie Contents) The web server runs IIS6. Thanks for your help Eric
[jQuery] Re: Accordion, fieldset and selectors question
Excellent Adriana - thanks very much - also for quietly pointing out that I'd forgotten the return false bit. Cheers/Bruce On Nov 27, 2:45 pm, Adriana adipa...@yahoo.com wrote: Hi Bruce, Try this: $('.accord h6').click(function() { $(this).toggleClass('expand_group').siblings ('h6.expand_group').removeClass('expand_group'); $(this).next('fieldset').slideToggle('fast').siblings ('fieldset:visible').slideUp('fast'); return false; }); Regards, Adriana On Nov 26, 11:41 am, Bruce MacKay thomasba...@gmail.com wrote: Hello folks, I have an operational accordion based on a series of fieldset tags (the content) and h6 tags (the triggers). It is initiated by: $('.accord h6').click(function() { $(this).next('fieldset').slideToggle('fast').siblings ('fieldset:visible').slideUp('fast'); }); The trigger tags are set up as h6 - span - Trigger title - /span - /h6 I want to add a class to the current h6 tag that will result in an open folder image to appear next to tag when its associated fieldset is open, and have that class removed when it or another h6 tag is clicked. I can add the class easily enough - but I can't work out the code/ selectors to remove the class when the clicked current trigger title is re-clicked (to close the fieldset) or another trigger title is clicked (to open its associated fieldset. $('.accord h6').click(function() { $(this).addClass('expand_group'); $(this).next('fieldset').slideToggle('fast').siblings ('fieldset:visible').slideUp('fast'); }); I'd really appreciate some direction to a solution if possible. Thanks, Bruce
[jQuery] Binding a function to 1 'a' tag - which approach is best?
Hello folks, I have some html returned via ajax that contains several 'a' tags to which I am binding a function. Both of the following methods does the job, but my perception of other posts about this general practice from more wiser folk than me is that the first method is the better method. Is this the case? Which is the best method - and more importantly, why? method #1 $('a.c_update').each(function() { var $a = $(this); var q = $a.attr('id'); $a.bind(click,function() {doStuff('getitem',q);return false;}); }); method #2 $('a.c_update').bind(click,function() {doStuff ('getitem',this.id);return false;}); Thanks, Bruce
[jQuery] Problem traversing up list
Hello there, after too much sarching I have almost give it up with the following. I have a list with another list nested: ul li id=item1Item 1 ul li id=item1-1 Item 1 - 1 /li li id=item1-2 Item 1 - 2 /li /ul /li /ul Let's say I know the ID of item1-2 or item1-1 how can I get the id of the li (item1)? I have tried with: alert($('#item1-1').parentNode().id) But it gaves me an error, maybe just because it is an aberration...
[jQuery] Re: Comparing or checking for a specific sub class?
Thank you very much. My issue with the invalid html is that I actually want to fade the background image of the a-element, and then keep the text visible. The a-elements are big squares with text inside them, and i use span to position the text in a left-center-way. I could only figure out how to animate the background in a xy-kind of way, so my quick and dirty solution was to insert a div and then make this become the real squares and then fade them. But I guess I could just turn them in to spans then in order to achieve correct html? On Nov 27, 6:02 am, Michael Geary m...@mg.to wrote: I think the method you're looking for is .not(): http://docs.jquery.com/Traversing/not Also, there is a shortcut for your mouseenter/mouseleave pattern called .hover(): http://docs.jquery.com/Events/hover If you look at the source code for .hover(), you can see that it is literally a wrapper for the two mouse events: hover: function(fnOver, fnOut) { return this.mouseenter(fnOver).mouseleave(fnOut); }, One other concern: It is invalid HTML to have a DIV element inside an A element. DIV is a block-level element and A is an inline element. You cannot have a block-level element inside an inline element. It will probably work in most browsers, but it's possible that some browser may decide to rearrange your elements to create a valid result. Setting that aside, your code might end up looking like: script type=text/javascript $(document).ready(function() { $('.page_item').not('.current_page_item').hover( function() { $(this).children('a').children('div').fadeIn(0); }, function() { $(this).children('a').children('div').fadeOut(200);} ); }); /script You could also (again ignoring the invalid HTML problem) simplify the .children bit like this: $(this).find('adiv').fadeIn (or fadeOut) There's no advantage to that other than brevity, so if you prefer the .children().children() approach that's fine too. -Mike On Thu, Nov 26, 2009 at 2:39 PM, Janmansilver jan.poul...@gmail.com wrote: I have a menu looking like this: li class=page_item current_page_item.../li li class=page_item.../li li class=page_item.../li and so on... I then have a mouseenter function that highlights/de-highlights the various menu items, but I would like to not having it affect the item with the extra class current_page_item. How do I solve this? my current code: script type=text/javascript $(document).ready(function() { $('.page_item').mouseenter(function(e) { $(this).children('a').children('div').fadeIn(0); }).mouseleave(function(e) { $(this).children('a').children('div').fadeOut(200); }); }); /script
Re: [jQuery] Binding a function to 1 'a' tag - which approach is best?
Now let's try to simplify this a bit : $('a.c_update').each(function() { var $a = $(this); var q = $a.attr('id'); $a.bind(click, function() { doStuff('getitem',q); // hmm, I don't like this variable much... return false; }); }); $('a.c_update').each(function() { var $a = $(this); $a.bind(click, function() { doStuff('getitem', $a.attr('id');); // there, no need return false; }); }); $('a.c_update').each(function() { var $a = $(this); $a.bind(click, function() { // wait, if I've bound my event to the link, why bother keep it as a variable before ? doStuff('getitem', $a.attr('id');); // there, no need return false; }); }); $('a.c_update').each(function() { $(this).bind(click, function() { // feels better doStuff('getitem', $(this).attr('id');); return false; }); }); $('a.c_update').each(function() { // hey, why bother looping, I could do it all with the .bind() function on the whole collection anyway $(this).bind(click, function() { doStuff('getitem', $(this).attr('id');); return false; }); }); $('a.c_update').bind(click, function() { // how sleaker doStuff('getitem', $(this).attr('id');); return false; }); So, basically you can reduce #1 to #2 breaking nothing, without any significan loss (in fact I think it's a net gain). Michel Belleville 2009/11/27 Bruce MacKay thomasba...@gmail.com Hello folks, I have some html returned via ajax that contains several 'a' tags to which I am binding a function. Both of the following methods does the job, but my perception of other posts about this general practice from more wiser folk than me is that the first method is the better method. Is this the case? Which is the best method - and more importantly, why? method #1 $('a.c_update').each(function() { var $a = $(this); var q = $a.attr('id'); $a.bind(click,function() {doStuff('getitem',q);return false;}); }); method #2 $('a.c_update').bind(click,function() {doStuff ('getitem',this.id);return false;}); Thanks, Bruce
Re: [jQuery] Problem traversing up list
It returns an empty string, so it alerts, but nothing... I will show you all the code: First I get the id of the element via URL with the URL param plugin: (It works, if I do an alert it returns the right stuff) var target = $.url.param(target); alert($(#+target).parent().attr('id')); This alerts nothing !! --- On Fri, 11/27/09, Michel Belleville michel.bellevi...@gmail.com wrote: From: Michel Belleville michel.bellevi...@gmail.com Subject: Re: [jQuery] Problem traversing up list To: jquery-en@googlegroups.com Date: Friday, November 27, 2009, 11:10 AM You don't need to use .parentNode() (vanilla DOM) but .parent() (jQuery flavor). Then you can access any attribute using .attr(). So instead try : $('#item1-1').parent().attr('id') This should tadaaa. Michel Belleville 2009/11/27 ximo wallas igguan...@yahoo.com Hello there, after too much sarching I have almost give it up with the following. I have a list with another list nested: ul li id=item1Item 1 ul li id=item1-1 Item 1 - 1 /li li id=item1-2 Item 1 - 2 /li /ul /li /ul Let's say I know the ID of item1-2 or item1-1 how can I get the id of the li (item1)? I have tried with: alert($('#item1-1').parentNode().id) But it gaves me an error, maybe just because it is an aberration...
Re: [jQuery] Problem traversing up list
Well, that must mean that the parent has no id, which is exactly the case : ul li id=item1Item 1 = $('#item1-1').parent().parent() ul = $('#item1-1').parent() li id=item1-1 = $('#item1-1') Item 1 - 1 /li li id=item1-2 Item 1 - 2 /li /ul /li /ul Or you can do this in a better way : $('#item1-1').parents('li:first').attr('id') Michel Belleville 2009/11/27 ximo wallas igguan...@yahoo.com It returns an empty string, so it alerts, but nothing... I will show you all the code: First I get the id of the element via URL with the URL param plugin: (It works, if I do an alert it returns the right stuff) var target = $.url.param(target); alert($(#+target).parent().attr('id')); This alerts nothing !! --- On *Fri, 11/27/09, Michel Belleville michel.bellevi...@gmail.com*wrote: From: Michel Belleville michel.bellevi...@gmail.com Subject: Re: [jQuery] Problem traversing up list To: jquery-en@googlegroups.com Date: Friday, November 27, 2009, 11:10 AM You don't need to use .parentNode() (vanilla DOM) but .parent() (jQuery flavor). Then you can access any attribute using .attr(). So instead try : $('#item1-1').parent().attr('id') This should tadaaa. Michel Belleville 2009/11/27 ximo wallas igguan...@yahoo.comhttp://mc/compose?to=igguan...@yahoo.com Hello there, after too much sarching I have almost give it up with the following. I have a list with another list nested: ul li id=item1Item 1 ul li id=item1-1 Item 1 - 1 /li li id=item1-2 Item 1 - 2 /li /ul /li /ul Let's say I know the ID of item1-2 or item1-1 how can I get the id of the li (item1)? I have tried with: alert($('#item1-1').parentNode().id) But it gaves me an error, maybe just because it is an aberration...
Re: [jQuery] Re: csv2table
Hi Toshiro Takahashi, Is there anyway without using server side scripting ... This is wat i am searching for more than a week . could u tell me... Thanks in advance On Fri, Nov 27, 2009 at 1:45 PM, tato t...@game.gr.jp wrote: Hi, Ram You can simplify it if you can use PHP. You acquire yahoo data in following PHP and receive it in csv2table of same domain. ?php $url=http://download.finance.yahoo.com/d/quotes.csv?s= %5EIXICf=sl1d1t1c1ohgve=.csvhttp://download.finance.yahoo.com/d/quotes.csv?s=%0A%5EIXICf=sl1d1t1c1ohgve=.csv ; $data=file_get_contents($url); // for safe Tag to lt; gt; echo htmlspecialchars($data, ENT_QUOTES); ? But please be careful about security. and, csv2table HTML is follow. script src=../js/jquery-1.3.2.min.js type=text/javascript/ script script src=../js/jquery.csv2table-0.02-b-2.9.js type=text/ javascript charset=utf-8/script script $(function(){ $('#view1').csv2table({ url:'./getcsv.php', appendThead:['a','b','c','d','e','f','g','h','i'] }) }); /script div id=view1/div @see Sample: http://jsgt.org/lib/jquery/plugin/csv2table/v002/test/test.htm On 11月27日, 午後1:34, Ram naviamarkets@gmail.com wrote: Hi Toshiro Takahashi First i should say thanks to you for replying Actually i need to read data from yahoo stock quotes and show it in my website so can you guide me to get data. http://download.finance.yahoo.com/d/quotes.csv?s=%5EIXICf=sl1d1t1c1o... Pls in detail. On Nov 27, 7:10 am, tato t...@game.gr.jp wrote: By the way, the reason why csv2table cannot read the text file of the other domain is because it uses $.get method of jQuery. But I do not get along well even if I change $.get in $.getScript. When capture a TCP packet, the data body arrives,; but csv data as for the JavaScript is because is not it. The method to obtain it thought, but a person distributing json in the other domain is that it is easy first of all :p -- Toshiro Takahashihttp:// plugins.jquery.com/project/csv2tablehttp://plugins.jquery.com/... On 11月27日, 午前10:49, Toshiro Takahashi t...@game.gr.jp wrote: Hi, Ram Thank you for using my plugin. On Thu, 26 Nov 2009 02:21:19 -0800 (PST) Ram naviamarkets@gmail.com wrote: I am new to jquery Its nice in csv2table i need to get values dynamically from a particular url everyminute ... i dont know how to get from particular url ( www.websitename.com?asdfasdf.csv ) and generate table for that value. Is the 'particular url' another Domain from yuor html? You cannot read the csv when that is it. If you can process the text file of the other domain, there is a method you make it json not csv, and to access. However, json does not implement it in csv2table. If get time; I may make json2table if you are necessary. $(function(){ $('#view1').csv2table('book12.csv'); }); any help will be appreciated .. -- Toshiro Takahashihttp:// plugins.jquery.com/project/csv2tablehttp://plugins.jquery.com/...
[jQuery] Re: Issue with simplemodal plugin and absolute positioned content
I've found a workaround. It appears that IE has some rendering bugs that collapses content in certain situations. The workaround I've found is to set the IE-specific zoom style to 1 on elements that exibit this behavior. The trick is that this needs to be applied after the new divs are injected into the body. I added the following onShow function when opening the modal: $(#dialogContent).modal({ overlay:80, overlayCss: {backgroundColor:#000}, containerCss: {'background-color':'#fff', 'padding':'5px', 'border':'2px solid black'}, onShow:function (dialog) {$(body).css({zoom: '1'});} }); And that fixes the issue. In this case, the rendering bug only seems to happen when content is injected into the DOM. I ran a test by exporting the realized DOM after simplemodal rendered the overlay (without the zoom fix applied) and saved the the content as a static page. When loading this page, everything rendered correctly. I'm not sure if you want to integrate the above IE fix into the simplemodal code, but at least if someone else hits this issue, a solution exists! Eric
[jQuery] Re: Problem traversing up list
$('#item1-1').parent().closest('li').attr('id') will be faster because it won't retrieve the full list of parents On 27 nov, 13:20, Michel Belleville michel.bellevi...@gmail.com wrote: Well, that must mean that the parent has no id, which is exactly the case : ul li id=item1Item 1 = $('#item1-1').parent().parent() ul = $('#item1-1').parent() li id=item1-1 = $('#item1-1') Item 1 - 1 /li li id=item1-2 Item 1 - 2 /li /ul /li /ul Or you can do this in a better way : $('#item1-1').parents('li:first').attr('id') Michel Belleville 2009/11/27 ximo wallas igguan...@yahoo.com It returns an empty string, so it alerts, but nothing... I will show you all the code: First I get the id of the element via URL with the URL param plugin: (It works, if I do an alert it returns the right stuff) var target = $.url.param(target); alert($(#+target).parent().attr('id')); This alerts nothing !! --- On *Fri, 11/27/09, Michel Belleville michel.bellevi...@gmail.com*wrote: From: Michel Belleville michel.bellevi...@gmail.com Subject: Re: [jQuery] Problem traversing up list To: jquery-en@googlegroups.com Date: Friday, November 27, 2009, 11:10 AM You don't need to use .parentNode() (vanilla DOM) but .parent() (jQuery flavor). Then you can access any attribute using .attr(). So instead try : $('#item1-1').parent().attr('id') This should tadaaa. Michel Belleville 2009/11/27 ximo wallas igguan...@yahoo.comhttp://mc/compose?to=igguan...@yahoo.com Hello there, after too much sarching I have almost give it up with the following. I have a list with another list nested: ul li id=item1Item 1 ul li id=item1-1 Item 1 - 1 /li li id=item1-2 Item 1 - 2 /li /ul /li /ul Let's say I know the ID of item1-2 or item1-1 how can I get the id of the li (item1)? I have tried with: alert($('#item1-1').parentNode().id) But it gaves me an error, maybe just because it is an aberration...
[jQuery] Re: Problem with plugins
This code is on a .php file... i just renamed the file to .js to attach to the e-mail... On Nov 23, 9:05 am, Michel Belleville michel.bellevi...@gmail.com wrote: First of all, if this is a .js script, why is there html in the first few lines ? Michel Belleville 2009/11/23 Paulodemoc paulode...@gmail.com Its the javasscript on the php page, and the only php there is to output the urls, and these urls are being printed correctly The url doesn't affect the understanding of the rest of the code... On Nov 19, 3:08 pm, Michael Geary m...@mg.to wrote: Can you post a link to a test page? It's impossible to tell what is wrong from the .js file you attached. It's not even JavaScript code: it's PHP code. The browser doesn't ever see your PHP code. All it sees is the *output* of the PHP code. There could be any number of things wrong, but there's no way to tell what they may be without seeing that actual output in a test page. -Mike On Thu, Nov 19, 2009 at 8:03 AM, Paulo Henrique paulode...@gmail.com wrote: Can someone help me find any problem with the code attached? I am using it on a website, but its happening a problem with some of my plugins... I use all of them on other websites and they all work fine, but on this one, some aren't working. When I call the editable plugin, it throws an error message saying editable is not a function... the same happens with sortable, from jquery-ui... On another website I'm working, this happens with ALL jquery plugins. Does anyone know what might be causing this? Att. Paulo Henrique Vieira Neves Bsc. Sistemas de Informação +55 38 9141 5400 MSN: paulode...@live.com GTALK: paulode...@gmail.com SKYPE: paulodemoc
Re: [jQuery] Re: Problem with plugins
On Mon, Nov 23, 2009 at 5:55 AM, Paulodemoc paulode...@gmail.com wrote: Its the javasscript on the php page, and the only php there is to output the urls, and these urls are being printed correctly The url doesn't affect the understanding of the rest of the code... If your plugins aren't loading, those URLs are quite likely involved. We have no way of knowing if they are indeed working since we don't see the output. Try sending the HTML the browser is getting. -- Brett Ritter / SwiftOne swift...@swiftone.org
[jQuery] Re: Close Button using prettyPhoto w/ JQuery
On Nov 25, 3:46 pm, jonnyvegasss jonnyvega...@yahoo.com wrote: That seems to be exactly what I need. I'm just not sure how, where to add something like that. I apologize for my ignorance, but as I said I'm learning LOL! I'm sorry, it looks as though I didn't read your original closely enough. I thought you were talking about a true modal window rather than the prettyPhoto popup. I looked at the prettyPhoto documentation (http://tinyurl.com/dkuwya), and buried in the customization tab of the Setup section is the set of options you can pass into the prettyPhoto function. Among these are things like animationSpeed, padding, and opacity, and one called callback, which takes a function to be run when prettyPhoto closes. (Most similar scripts have a name that's a bit more descriptive, such as onClose.) To use this, you need to pass to the prettyPhoto function an object with certain properties. Because I led you astray before, I'm going to explain this in detail. But first, here's the solution I think you need: $(document).ready(function(){ $(a[rel^='prettyPhoto']).prettyPhoto({ callback: function() {window.location.reload(true);} }); }); You can see this in action here: http://jsbin.com/uvuwi (code http://jsbin.com/uvuwi/edit). Explanation: prettyPhoto allows you to supply a number of optional arguments. They are wrapped up in a single JavaScript object, which you can create with this syntax: { option1: value1, option2: 7, anotherOption: [a, four, element, list], stillAnother: function() {doSomething(); return false;}, finalOption: false } It's an unordered list of name-value pairs, separated by commas, surrounded by curly braces, and with a colon between each name and value. The values can be strings, numbers, arrays, functions, booleans, other objects, essentially any JavaScript values. For prettyPhoto, the options might look like this: var myOptions = { animationSpeed: 'slow', padding: 25, opacity: 0.5, callback: function(){doSomething();} } Then you could call $(selector).prettyPhoto(myOptions); As the only option we need is the one named callback, we can simply do this: $(a[rel^='prettyPhoto']).prettyPhoto({ callback: function() {doSomething();} }); And as to the function we call, this is pretty self-descriptive: window.location.reload(true); Putting that together inside a document ready event, we get the code I supplied above. I hope that all makes sense. Also, I looked at the links you posted, and I don't see the parent window refreshing after the child window is closed. I was just trying to show how to call a function when a child window closed. I didn't actually refresh the page, just ran an alert. Good luck, -- Scott
[jQuery] DataTables plugin - set id attribute for table rows?
My account hasn't been activated on the datatables forum so I need to ask this question here. Hope this is ok. I want to set an id for each row so that I can drag and drop the row onto another element. But I can't see how to do it from the website. Does anyone know if this is possible? Thanks
Re: [jQuery] DataTables plugin - set id attribute for table rows?
The id is an html node attribute. You just have to use the same method as for any other attribute, namely : http://docs.jquery.com/Attributes/attr#keyvalue Michel Belleville 2009/11/27 Stodge sto...@gmail.com My account hasn't been activated on the datatables forum so I need to ask this question here. Hope this is ok. I want to set an id for each row so that I can drag and drop the row onto another element. But I can't see how to do it from the website. Does anyone know if this is possible? Thanks
[jQuery] autocomplete plugin : detecting initial value problem, or how to programatically set the value
Hi there, We are using the rather nifty autocomplete plugin from http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ but have run into a problem $(#autocomplete).result( function(event, data, formatted) { alert(formatted) }).autocomplete([c++, java, php, coldfusion, javascript, asp], {}) This works as expected but we really would like to create the input element as input id=autocomplete type=text value=java and automatically have the result listner be invoked on creation of the autocomplete (why we bind the result listener prior to constructing the plugin) . We can use the search() function, but for some reason the plugin code stalls 25 millis before being completely initialized ( line 514 in v. 1.1) We can of course wait 26 millis before calling search, but in our context that is causing some other trouble. (ie we would have to delay a whole slew of other stuff as well) So the question is : Is there a particular reason why the list is not populated synchronusly? You can see a live example at http://jsbin.com/oweri It doesn't call search atm, but you can add that yourself : setTimeout(function() { $(#autocomplete).search()},26) Thanks in advance Johannes and Jens
[jQuery] Re: PHP jQuery on different port
i guess your experiencing the same origin policy problem here, which lets you only load data/whatever via ajax from the same origin as the calling page! it seems that the origin isnt just the domain but also the used port. so to make this work you could either use a new http header field which will only work in firefox 3.5+ (http://www.petefreitag.com/item/ 703.cfm) or you have to make your call with JSONP (http:// en.wikipedia.org/wiki/JSON#JSONP). i believe jQuery natively supports jsonp, never used it though. On 26 Nov., 10:58, Darjana darj...@gmail.com wrote: Hello, This user.php on port 80 $callback = $_GET[callback]; $user = $_GET[username]; if($user == lazy) { $response = array(message = SUCESS);} else { $response = array(message = FAIL); } echo $callback . (. json_encode($response) . );; This is index.html on port 8080 $.getJSON(user.php?callback=?, { username: lazy}, function(json){ alert(JSON Data: + json.message); // SUCCESS }); This is working if both files on same port, however, it doesn't when its not on same port Any workaround for this to work?
[jQuery] jQuery Validate using input type=image
I am validating a form that is submitted by an image input (input type=image), there are 3 of these inputs which either publish, save or delete the form details. If I turn javascript off and submit the form I can pick up the value of the input button used. i.e. request.form (publish.x) = ?, if I turn javascript on and use the jQuery validate plugin it does everything excpet pass the value of the button pressed so I can't detect which button has been pressed. Any help appreciated. [code] $(function() { $(#vml_library).validate({ ignore: input[type=hidden], rules: { mName: { required: true }, mSummary: { maxlength: 200 }, mDescription: { required: true }, mFile: { required: true, accept: +$(input[name=typeList]).val().replace(/\'/g, '').replace(/\./g, '').replace(/,/g, '|') + }, tFile: { required: function(element) { return $(input[name=vType]).val() 1; }, accept: true } }, messages: { mName: { required: Required }, mFile: { required: Required, accept: Invalid File, must be + $(input[name=typeList]).val() }, mSummary: { maxlength: You may not use anymore than 200 characters }, mDescription: { required: Required }, tFile: { required: Required, accept: Invalid File, must be '.jpg', '.jpeg', '.gif' or '.png' } }, success: function(label) { label.addClass(valid).text(OK!); }, highlight: function(element, errorClass) { $(element).addClass(errorInput); }, unhighlight: function(element, errorClass) { $(element).removeClass(errorInput); }, submitHandler: function(form) { ShowProgress(); form.submit(); } }); }); [/code]
[jQuery] Re: Problem traversing up list
Did you try this: alert($('#item1-1').parent().attr('id')); On 27 Nov., 12:56, ximo wallas igguan...@yahoo.com wrote: Hello there, after too much sarching I have almost give it up with the following. I have a list with another list nested: ul li id=item1Item 1 ul li id=item1-1 Item 1 - 1 /li li id=item1-2 Item 1 - 2 /li /ul /li /ul Let's say I know the ID of item1-2 or item1-1 how can I get the id of the li (item1)? I have tried with: alert($('#item1-1').parentNode().id) But it gaves me an error, maybe just because it is an aberration...
[jQuery] i found error in jquery.treeview.js
i ask you help me. I found error in jquery.treeview.js i get a list of units which have children units. this is links like this:a href= onclick=javascript:clearAsync();getTreeView(7);return false;Отдел сопровождения ПЦ/a When i click on, i send get param to php server and give : [{text: Блок ИТ,id: 1,expanded: true,children:[{text: Бочарников Игорь Викторович И.О. Управляющего директора 1075, 1202}, {text: Департамент проектирования информационных систем,id: 2,expanded: true,children:[{text: Управление по разработке отчетных и аналитических систем,id: 5,expanded: true,children: [{text: Отдел систем финансового анализа,id: 18}]}]}]}] and then jquery function getTreeView(kodbpod){ $(#async).treeview({ url: showTreePod.php?kodbpod=+kodbpod }) } - builds tree and move it into ul id=async/ul. Аnd then happens something strange. When at first time builds tree by onclick the tree branches are closed and open. When clicking the same storage link a href= onclick=javascript:clearAsync();getTreeView(7);return false;Отдел сопровождения ПЦ/a at second time - builds tree but the tree branches are not closed and not open. I look the source code on the page and saw this: 1. when tree works: ul class=treeview id=asyncli class=open collapsable lastCollapsable id=1div title=tree_div class=hitarea open- hitarea collapsable-hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divspan class=Блок ИТ/spanulli id=spana class= href=Бочарников Игорь Викторович И.О. Управляющего директора 1075, 1202/a/span/lili class=open collapsable lastCollapsable id=2div title=tree_div class=hitarea open-hitarea collapsable- hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable- hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divspan class=Департамент проектирования информационных систем/spanul style=display: block;li class=open collapsable lastCollapsable id=5div title=tree_div class=hitarea open-hitarea collapsable- hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable- hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divspan class=Управление по разработке отчетных и аналитических систем/ spanulli class=last id=18spanОтдел систем финансового анализа/span/li/ul/li/ul/li/ul/li/ul 2. when tree NOT WORKS: ul class=treeview id=asyncli class=open collapsable lastCollapsable id=1div title=tree_div class=hitarea open- hitarea collapsable-hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divspan class=Блок ИТ/spanulli id=spana class= href=Бочарников Игорь Викторович И.О. Управляющего директора 1075, 1202/a/span/lili class=open collapsable lastCollapsable id=2div title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable- hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divspan class=Департамент проектирования информационных систем/ spanulli class=open collapsable lastCollapsable id=5div title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divdiv title=tree_div class=hitarea open-hitarea collapsable-hitarea lastCollapsable-hitarea/divspan class=Управление по разработке отчетных и аналитических систем/ spanulli class=last id=18spanОтдел систем финансового анализа/span/li/ul/li/ul/li/ul/li/ul you see? created duplicated DIV. This is mean before create div the function does not check for an element DIV in DOCUMENT. this.prepend(div title=\tree_div\ class=\ + CLASSES.hitarea + \/).find(div. + CLASSES.hitarea).each(function() { var classes = ; $.each($(this).parent().attr(class).split( ), function() { classes += this + -hitarea ; }); $(this).addClass( classes ); }); AND so everytime. even clicks works on odd clicks not working. How this error fix? iammul...@gmail.com
[jQuery] jquery-plugin-treeview problem with inser menu into div
I would like to use jquery treeview within a site with defined height (500px), is possible insert into a div floating like http://www.kelvinluck.com/assets/jquery/jScrollPane/basic.html i don't setting correctly height when open menu with much rows please help me regards f.m.
[jQuery] disappearing URL using Accordion UI
My url disappears inside when the DIV is expanded. hovering over the url the text then appears. using release jquery-ui-1.7.2.custom.css script type=text/javascript $(document).ready(function(){ $(#accordion).accordion({active: false, collapsible: true, autoHeight: true, alwaysOpen: false }); $(#accordion2).accordion({ active: false, collapsible: true, autoHeight: true, alwaysOpen: false }); $(#accordion3).accordion({ active: false, collapsible: true, autoHeight: false, alwaysOpen: false }); }); /script PFONT face=Verdana size=2STRONGInstructions /STRONG/FONT div id=accordion h4a id=mylink href=#General Rules /a/h4 div PFONT face=VerdanaAll sections of the A title= href=http://www.tiaa-cref.org/pdf/forms/F11043.pdf; target=_blankUBTOA/B/U /A form must be completed./FONT/P PFONT face=VerdanaSTRONGA complete copy of the delivering account statement within 6 months is required./STRONG BRAccount registrations must match */FONT/PA title= href=http://clab.glb.tiaa-cref.org/pdm/ indp/sc/Documents/Managed%20Accounts/Funding%20Managed%20Accounts/ ACAT.aspx#REF target= PUAre you transferring different registrations?/U/P/A/U /div
[jQuery] Issue in finding the controls from asp.net usercontrols
Hi, I am trying to find a table first tr tag which is located in a usercontrol from a main page like the following $(table[id*=nav]).find(tr).size() this shows 0, but it is available on the usercontrol i couldn't able to find any elements in usercontrol through main page. please help.
[jQuery] can it validate elements that are not in a form?
i wan't to validate some elements that are contained in a div tag.
[jQuery] Tabbed content problem
I'm currently using a jquery script that converts li's to categorically tabbed thumbnails. You can see what I'm talking about here: http://2photoshop.com/portfolio/ (this contains the original code from the script I use, only the style is changed) I wanted to change it so instead of having the All category be viewed first, only the web design content will show at first. I tried doing this and this is the best I could manage: http://2photoshop.com/portfolio2/ If you look, you will notice that instead of only Web Design content showing up, all of it does. Only after you click around the categories does it show the correct content. I tried different things to figure out what needs to be changed in the jquery code but I could not get it to work. Can anyone please point me to what part of the code needs to be altered? My jquery code is currently: - $(document).ready(function() { $('ul#filter a').click(function() { $(this).css('outline','none'); $('ul#filter .current').removeClass('current'); $(this).parent().addClass('current'); var filterVal = $(this).text().toLowerCase().replace(' ','-'); if(filterVal == 'all') { $('ul#portfolio li.hidden').fadeIn('slow').removeClass('hidden'); } else { $('ul#portfolio li').each(function() { if(!$(this).hasClass(filterVal)) { $(this).fadeOut('normal').addClass('hidden'); } else { $(this).fadeIn('slow').removeClass('hidden'); } }); } return false; }); }); - Thanks for your help!!
Re: Re[jQuery] move appended element
Perhaps it's a problem with your CSS rules. Is the style not removed? On Fri, Nov 27, 2009 at 4:39 AM, coldwired co...@coolwired.net wrote: Hi, Sorry, that was a slight typo on my part, it should be class selected. The problem I have with just appending using addClass is that when the class is removed it doesn't restore the element to it original state a such. What I mean is when the class is removed it leaves class= rather than a blank that it was before. I need to have the exact quote of the code so I can't have class=. Is there a solution to this? Thanks, Colin. coldwired wrote: Hi, I'm trying to append an div element around the element that triggers the on hover event, then remove the div on mouse out (blur). I normally would use addClass / removeClass but this leaves class= when the class is removed and not the original state of the html. Here's my code, I can't work out how to remove the appended div correctly... : jQuery(p,h1,h2,h3,span,li, dd, dt,b,em,strong).hover(function() { jQuery('div class=selected/div').append(jQuery(this).clone()).html(); active = true; }, function() { jQuery(.insense-selected).remove(); active = false; }); This doesn't work as expected, can anyone help out? A solution to either problem described would suffice! Thanks, Colin. -- View this message in context: http://old.nabble.com/Remove-appended-element-tp26534745s27240p26539951.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: IE balking at .siblings() - says 'Object does not support this property or method'
BH ++ 'It's awfully hard to troubleshoot a code snippet without seeing the actual error in a live running page.'++ You did good. I added the 'var' and IE is playing nicely now. Thank you for taking the time. On Nov 26, 10:16 pm, Michael Geary m...@mg.to wrote: The first thing that caught my eye looking at your code is the missing var on this line: lg_pic = $(this).siblings('.lg_pic_name').html(); Surely you don't want to be creating a global variable here? It should be: var lg_pic = $(this).siblings('.lg_pic_name').html(); It's even possible that this will fix your problem. Do you have an element in your page with id=lg_pic? If so, this will fix it. For every element ID in your page, IE creates a *read-only* property on the window object with that name. So if you have an element with id=lg_pic, then there is a window.lg_pic property that is read-only. When you try to store a value into that property it will fail. If that doesn't turn out to be it, can you please post a link to a test page? It's awfully hard to troubleshoot a code snippet without seeing the actual error in a live running page. -Mike On Thu, Nov 26, 2009 at 12:47 PM, Getzel far...@gmail.com wrote: BH I created a slider of thumbnail images. I write the image filepaths directly into the HTML using PHP, so instead of using expandos I placed a hidden div after each image containing the file name of the large version to be shown onclick. Works fine in FF and Chrome. IE stops at the first line in the function, at .siblings(). It throws an error saying 'Object does not support this property or method.' $('.pic_listing img').click(function(){ // Set the a variable with large image associated with the thumb lg_pic = $(this).siblings('.lg_pic_name').html(); // If it is not currently displayed if($('#lg_pic_src').attr('src') != path+lg_pic){ //Hide Old Image $('#lg_pic_src').css('display','none'); //Replace it $('#lg_pic_src').attr('src',path+lg_pic); // Display Loader img $('#loader').css('z-index',1); // Once its loaded, Hide Loader and FadeIn the new image $('#lg_pic_src').load(function () { $('#loader').css('z-index',-1); $('#lg_pic_src').fadeIn(); }); } }); Anyone have any thoughts as to why IE would throw an error? Other functions defined in the same file work fine. Thanks, Getzel
[jQuery] $.ajax and $.get
Hi Guys, Need some help on $.get or $.ajax, I have the following code that will send request to server then get either JSON or XML data back, but it seems only working in IE8, not working in Firefox 3.5, In IE8, it returns: data: [object Object] textStatus: success something: undefined in Firefox 3.5 it returns: XMLHttpRequest: [object XMLHttpRequest] textStatus: parsererror errorThrown: undefined Wonder why am I getting parsererror here? $.ajax({ type: GET, url: http://192.168.213.85:8080/solr/select?q=northwt=jsonindent=onqt=standard , dataType: json, success: function (data, textStatus, something) { alert(data: +data+\n+textStatus: +textStatus+\n+something: +something); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest: +XMLHttpRequest+\n+textStatus: +textStatus+\n+errorThrown: +errorThrown); } }); Regards, W
[jQuery] validation method not working in ie
Hi i'm using the validation plugin on a form. I added three methods to check that three select value are not equal but it doesn't work in ie. here's the page http://www.fepgroup.it/community/registrati__.php Any idea why? Thanks Vittorio
[jQuery] Get value from hidden input and use it in string
Hello, I am using JPlayer to play a sound on a page: http://www.happyworm.com/jquery/jplayer/0.2.5/demo-04.htm $(document).ready(function(){ $(#jquery_jplayer).jPlayer({ ready: function () { $(#trackname).text($(#track-01).text()); $(this).setFile('http://www.miaowmusic.com/mp3/Miaow-05-The- separation.mp3').play(); demoInstanceInfo($(this), $(#jplayer_info)); } }) }); How can I change the setFile code line to: $(this).setFile('http://domain.com/asset/get/[id]').play(); Where [id] value should be taken from the following hidden input: input TYPE=hidden VALUE=2 NAME=Music Thank You, Miguel
[jQuery] Hide chat content
Hi, at: http://jerry.hostcule.net/chat/test.html, i have the delete link, and i want it to fade out the parent div, this is my current code: $('a.#hide').click(function() { $(this).hide(); } ); This is the link html: div id='msg' tr td style='border-bottom:1px solid #00;'b(2:34:28)/b Jerry: bkgi/td td width=20px style='border-bottom:1px solid #00;' a id=hide href=#Delete/a /td /tr /div **It is formatted for easy reading Am i doing anything wrong? The only thing I can think of is that the new ajax load is overriding it...
[jQuery] Re: Hide chat content
I have verified that it is not the ajax call.
Re: [jQuery] jQuery Validate using input type=image
The plugin handles that case, though only for type=submit. You could try using a button instead: button type=submitimg ... //button Jörn On Fri, Nov 27, 2009 at 12:52 PM, Rich reholme...@googlemail.com wrote: I am validating a form that is submitted by an image input (input type=image), there are 3 of these inputs which either publish, save or delete the form details. If I turn javascript off and submit the form I can pick up the value of the input button used. i.e. request.form (publish.x) = ?, if I turn javascript on and use the jQuery validate plugin it does everything excpet pass the value of the button pressed so I can't detect which button has been pressed. Any help appreciated. [code] $(function() { $(#vml_library).validate({ ignore: input[type=hidden], rules: { mName: { required: true }, mSummary: { maxlength: 200 }, mDescription: { required: true }, mFile: { required: true, accept: +$(input[name=typeList]).val().replace(/\'/g, '').replace(/\./g, '').replace(/,/g, '|') + }, tFile: { required: function(element) { return $(input[name=vType]).val() 1; }, accept: true } }, messages: { mName: { required: Required }, mFile: { required: Required, accept: Invalid File, must be + $(input[name=typeList]).val() }, mSummary: { maxlength: You may not use anymore than 200 characters }, mDescription: { required: Required }, tFile: { required: Required, accept: Invalid File, must be '.jpg', '.jpeg', '.gif' or '.png' } }, success: function(label) { label.addClass(valid).text(OK!); }, highlight: function(element, errorClass) { $(element).addClass(errorInput); }, unhighlight: function(element, errorClass) { $(element).removeClass(errorInput); }, submitHandler: function(form) { ShowProgress(); form.submit(); } }); }); [/code]
[jQuery] Animate/FadeIn on Hover Problem
Hi, I currently have this menu http://valkesh.000space.com and what I would like to do is get the image on the item to Fade In and Fade Out. Im not sure if im using the correct concept of javascript, but the thing is I would like the 'hovering' images to be split into 2, so that the 'center' can grow according to the width of the li item, rather than having everything fixed width. Also, if there is a way to simplify what I am doing, please let me know, because I am currently using a sort of lavalamp concept but hiding the 'move' process from one li to the other. I just want the hover effect, but with the option of having a hover based on 2-3 images. Basically the entire code is the following - style type=text/css ul.nav { list-style:none; overflow:hidden; } ul.nav li { float:left; height:39px; background-color:#66; padding:0 5px; } ul.nav li.last { -moz-border-radius-topright:9px; -webkit-border-top- right-radius:9px; -moz-border-radius-bottomright:9px; -webkit-border-bottom-right-radius: 9px; } ul.nav li.bg { margin:7px 0px 0px 3px; padding-right:8px; position:absolute; z-index:50; left:155px; width:60px; background:url (bg-right.png) no-repeat right top; } ul.nav li .left{ background:url(bg.png) no-repeat left top; height: 39px; } ul.nav li a {padding:8px 20px; color:#00; font-size:18px; font- weight:bold; display:block; text-decoration:none; z-index:100; position:relative; } /style script type=text/javascript src=jquery-1.3.1.min.js/script script src=jquery.easing.js type=text/javascript/script script type=text/javascript $(document).ready(function() { $('#nav1 li.bg').css({opacity: 0, visibility: visible}); $('#nav1 li a').hover(function() { var offset=$(this).offset(); var thiswidth =$(this).width()+13; $('#nav1 li.bg').stop().animate({left:offset.left +px,width:thiswidth+px},100); $('#nav1 li.bg').css({opacity: 0, visibility: visible}).animate({opacity: 100}); }, function() { $('#nav1 li.bg').stop().animate({left:155px,width:60px},100); $('#nav1 li.bg').css({opacity: 0, visibility: visible}); }); }); /script body div class=menucontainer style=margin-top:15px; ul class=nav id=nav1 lia href=#Home/a/li lia href=#Services/a/li lia href=#Contact Us/a/li li class=bgdiv class=left/div/li /ul /div Thanks
Re: [jQuery] Re: $.getScript results in two requests!
Glad you tracked that down - pretty nasty bug in Firebug! Just curious, 1.3 is still a pretty old version. Any reason not to use the latest Firebug 1.4.5? -Mike On Fri, Nov 27, 2009 at 2:43 AM, Eric ikeah...@gmail.com wrote: Hey there, Thanks for your answers. Sorry I didn't reply earlier, been pretty busy. It turned out the problem was caused by an old version of Firebug ( http://code.google.com/p/fbug/issues/detail?id=928 ). I am now using Firebug 1.3 on Firefox 3.5, where the bug is fixed. Eric On 25 Nov., 17:03, donb falconwatc...@comcast.net wrote: Be very certain you don't accidentally bind a click function twice somehow. Assuming, that is, a click initiates the action. Setting a Firebug breakpoint on entry to the repeated code, then inspecting the Stack panel to see how you got there each time, will probably reveal how this occurs. On Nov 24, 9:50 am, Eric ikeah...@gmail.com wrote: Hey there, A $.getScript() call I am making results in two seperate requests to the server. Any chance I can avoid that? Here are the headers: GET server.file?param1=param2 HTTP/1.1 Host: server User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; de; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20 Accept: text/javascript, application/javascript, */* Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive X-Requested-With: XMLHttpRequest Referer:http://server/indexfile.html Cookie: (Cookie Contents) Followed by... GET server.file?param1=param2 HTTP/1.1 Host: server User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; de; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20 Accept: text/xml,application/xml,application/xhtml+xml,text/ html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: (Cookie Contents) The web server runs IIS6. Thanks for your help Eric
Re: [jQuery] $.ajax and $.get
If you would post a link to a test page, I'm sure someone can tell you what's wrong. Without that, we have to start playing 20 Questions. :-) First questions: 1) What is the response from the server in both cases? 2) Install Fiddler2 [*] and have it log the session. What does it show? -Mike [*]: http://www.fiddler2.com/ On Fri, Nov 27, 2009 at 5:50 AM, Wayne Tong wei.tong.n...@gmail.com wrote: Hi Guys, Need some help on $.get or $.ajax, I have the following code that will send request to server then get either JSON or XML data back, but it seems only working in IE8, not working in Firefox 3.5, In IE8, it returns: data: [object Object] textStatus: success something: undefined in Firefox 3.5 it returns: XMLHttpRequest: [object XMLHttpRequest] textStatus: parsererror errorThrown: undefined Wonder why am I getting parsererror here? $.ajax({ type: GET, url: http://192.168.213.85:8080/solr/select?q=northwt=jsonindent=onqt=standard , dataType: json, success: function (data, textStatus, something) { alert(data: +data+\n+textStatus: +textStatus+\n+something: +something); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest: +XMLHttpRequest+\n+textStatus: +textStatus+\n+errorThrown: +errorThrown); } }); Regards, W
Re: [jQuery] $.ajax and $.get
Hi Michael, It is one of our internal server here, and don't think you will have access to it, see the message it returns when I use $.ajax in IE8, it returns: data: [object Object] textStatus: success something: undefined in Firefox 3.5 it returns: XMLHttpRequest: [object XMLHttpRequest] textStatus: parsererror errorThrown: undefined Regards, W On Fri, Nov 27, 2009 at 5:28 PM, Michael Geary m...@mg.to wrote: If you would post a link to a test page, I'm sure someone can tell you what's wrong. Without that, we have to start playing 20 Questions. :-) First questions: 1) What is the response from the server in both cases? 2) Install Fiddler2 [*] and have it log the session. What does it show? -Mike [*]: http://www.fiddler2.com/ On Fri, Nov 27, 2009 at 5:50 AM, Wayne Tong wei.tong.n...@gmail.comwrote: Hi Guys, Need some help on $.get or $.ajax, I have the following code that will send request to server then get either JSON or XML data back, but it seems only working in IE8, not working in Firefox 3.5, In IE8, it returns: data: [object Object] textStatus: success something: undefined in Firefox 3.5 it returns: XMLHttpRequest: [object XMLHttpRequest] textStatus: parsererror errorThrown: undefined Wonder why am I getting parsererror here? $.ajax({ type: GET, url: http://192.168.213.85:8080/solr/select?q=northwt=jsonindent=onqt=standard , dataType: json, success: function (data, textStatus, something) { alert(data: +data+\n+textStatus: +textStatus+\n+something: +something); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest: +XMLHttpRequest+\n+textStatus: +textStatus+\n+errorThrown: +errorThrown); } }); Regards, W
[jQuery] jquery.form.js and uploading only files
Hi there, I'm trying to use jquery.form.js to allow file uploads with my application. I'm trying to replace saving the whole form and uploading a image all at the same time by hijacking just the input[type=file] change event when you select a file and saving just the file using ajax and then the whole form can be submitted as usual without the image. Basically to always save the image first to avoid uploading it multiple times if the rest of the form data is found to be invalid. I can get this uploading the image working fine, but by submitting the entire form. I want to filter down the form data conserving only the file upload. Can anyone point me in the right direction on how to filter the uploaded data? Many thanks RobL
[jQuery] Re: Hide chat content
On Nov 27, 12:03 pm, Jerry Johnson jerryhost@gmail.com wrote: $('a.#hide').click(function() { $(this).hide(); } ); What does a.#hide mean? Shouldn't that just be a#hide, or better yet, #hide? div id='msg' tr td style='border-bottom:1px solid #00;'b(2:34:28)/b Jerry: bkgi/td What is a table row doing directly inside a DIV? -- Scott
[jQuery] Re: Superfish jQuery menu plugin RTL support
Charlie, I did tried that, it's not so simple, the float change the direction of the lists but not the location. Anyone have the actual working thing? I have this example for vertical RTL Superfish: http:2tbsp.com/node/114 Maybe it will help, Thanks again. On 26 נובמבר, 20:40, Charlie charlie...@gmail.com wrote: change the LI's to float right instead of left Vlad Shapiro wrote:Ahoy! I'm trying to adjust Superfish nav-bar style menu for RTL'ed Hebrew website, Example:http://users.tpg.com.au/j_birch/plugins/superfish/#sample4but no success so far, maybe someone already have this solved? Any help will be most appreciated! Best regards, Vlad.
[jQuery] Re: slideToggle lag in Firefox
Ah thank you. That clears things up a bit. I'll do some more testing and come up with a solution if I have to. On Nov 24, 7:39 am, Alexandru Adrian Dinulescu alex.d.a...@gmail.com wrote: Firefox really eats a lot of memory when it's up for a long time. I also encountered that issue not only in sliding but in animations that move stuff around. Problem is that firebug really makes stuff slower, because it shows you real-time what the browser is doing. The console / net thingy also eat a lot of time, as it's ocnstantly fetching requests. Also after a while firefox itself starts to lag ( like every good program, it has to be reinstalled once a year to keep things smooth ). My advice is to go for the fast setting but if this problem only happens for you then it doesnt mean that it will happen for everyone else also. If you are concerned about firefox posibilities you can browser.detect gecko (since that's firefox's engine) and make a different thing for it. Now it also depends on what firefox version you have, 3.5 is a lot faster than 3 and i dont even compare it to 2. Regards --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619 Odesk Profile:http://www.odesk.com/users/~~3a2d7f591313701b RentACoder Profile:http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf... LinkedIn Profile:http://ro.linkedin.com/in/alexandrudinulescu XHTML/CSS/jQuery Blog -http://alexdweb.com/blog MainWebsite:http://alexdweb.com On Tue, Nov 24, 2009 at 5:11 AM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I have the same problem. Firefox eats up a lot of memory when open for a long time (900k sometimes) and my toggle divs drag ass. If I find a solution I would be happy to hear. Thanks, Dave -Original Message- From: Jason Kaczmarsky [mailto:jkaczmar...@yahoo.com] Sent: November-23-09 10:06 PM To: jQuery (English) Subject: [jQuery] slideToggle lag in Firefox So I have a div with an input, textarea, and submit button. A link makes it so you can expand/contract this div. In Firefox only, the div resize is very laggy and its clearly shown on the site. That happens when you open it. The rest of the site is pushed down like its supposed to, but the elements being moved seem to duplicate, like FF is not rending things fast enough. The above image is the bottom of the site, appearing multiple times when it should once appear once. I read somewhere that Firebug causes things to be slower, and I do have Firebug installed, but I tested it on another computer without Firebug and the same thing happens. It works much smoother in any other browser. No virus found in this incoming message. Checked by AVG -www.avg.com Version: 9.0.709 / Virus Database: 270.14.76/2519 - Release Date: 11/23/09 04:22:00
Re: [jQuery] Re: Hide chat content
On Fri, Nov 27, 2009 at 1:47 PM, Scott Sauyet scott.sau...@gmail.comwrote: On Nov 27, 12:03 pm, Jerry Johnson jerryhost@gmail.com wrote: $('a.#hide').click(function() { $(this).hide(); } ); What does a.#hide mean? Shouldn't that just be a#hide, or better yet, #hide? div id='msg' tr td style='border-bottom:1px solid #00;'b(2:34:28)/b Jerry: bkgi/td What is a table row doing directly inside a DIV? -- Scott What does a.#hide mean? Shouldn't that just be a#hide, or better, yet, #hide? Yes, you are correct. I have changed it ti #hide div id='msg' tr td style='border-bottom:1px solid #00;'b(2:34:28)/b Jerry: bkgi/td What is a table row doing directly inside a DIV? Ok, i took away the tr and td's, but, it still doesn't work.
[jQuery] Re: $.ajax and $.get
On Nov 27, 12:44 pm, Wayne Tong wei.tong.n...@gmail.com wrote: It is one of our internal server here, and don't think you will have access to it, see the message it returns when I use $.ajax What Michael is trying to point out is that it's pretty difficult to debug something when we can't see either the page that's failing or the data that you are requesting. If you have the ability to at some public location post the output of the ajax request and a simple demo page that uses your code, you'd be more likely to get some useful help. Certainly repeating the error messages again doesn't add much. My first guess, though, is that the returned JSON is in some way formatted poorly. IE decides it knows what to do with it. FF throws its hands up in despair. -- Scott
[jQuery] Rollovers - change from blackwhite to colour
I'm trying to simplify the creation of image rollovers by using a *single* image instead of multiple states saved as separate images or sprites. I've used the fade-in/fade-out effect as shown here: http://www.hv-designs.co.uk/tutorials/jquery/all.html This works perfectly, but now I'd like the images to also change from blackwhite to colour on hover. Is that possible with a plugin? Any hints are very much appreciated. Martin
[jQuery] slideToggle stops working after refreshing content with Ajax
I can't figure out what's wrong. The slidetoggle works fine until I refresh the page using Ajax, even though the same exact html is outputted by mycontent.php !--SLIDETOGGLE-- script type=text/javascript jQuery(document).ready(function() { jQuery(.displayer).click(function() { jQuery(this).next(.hidlayer).slideToggle(100); }); }); /script script type=text/javascript!--AJAX-- function refreshcontent(){ $.get(mycontent.php, function(data){ $(#container).animate({ opacity: hide }, 200); $(#container).html(data); $(#container).animate({ opacity: show }, 200); }); } /script !--JQUERY CODE END-- !--OUTPUT FROM MYCONTENT.PHP-- div id=container div class=message_block div class=?php echo $class; ??php echo $cando; ?/div div class=message_block_text table class=displayer btn border=0 width=645 tr td width=30span class=iconimg src=images/arrow.png alt=arrow width=16 height=14 //span/td td width=100div class=unha_sections aquenspan class=message_info_textUsuario /spanspan class=unha_info_data?php echo $aquen; ?/span/div/td td width=300divspan class=unha_info_data?php echo $mymessage; ?/span/div/td td width=66div class=unha_sections activatedspan class=unha_info_textEnviado: /spanspan class=unha_info_data? php echo $act; ?/span/div/td td width=34 style=text-align:right;img src=images/ envooo.png width=34 height=23 alt= //td /tr /table div class=hidlayer ?php echo $message; ? div class=optionsEdit/div /div /div /div /div !--OUTPUT FROM MYCONTENT.PHP END--
[jQuery] JQuery Dialog and a4j:commandLink (JSF)
Hello ppl, I have a problem with using jQuery Dialog and Ajax submit in JSF. I have the following code for displaying Dialog windows: script type=text/javascript jQuery(function(){ // Dialog jQuery('#dialog').dialog({ dialogClass: 'alert', autoOpen: false, width: 300, height: 150, modal: true, resizable: false, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { Ok: function() { jQuery(this).dialog(close); return true; }, Cancel: function() { jQuery(this).dialog(close); return false; } } }); // Dialog Link jQuery('#dialog_link').click(function(){ jQuery('#dialog').dialog('open'); return false; }) .hover( function() { jQuery(this).addClass('ui-hover-state'); }, function() { jQuery(this).removeClass('ui-hover-state'); } ); }); /script It works as it should - it displays box when link is clicked. Now, I have something like this, for deleting something: a4j:commandLink actionListener=#some.action reRender=something onclick=if(!jQuery('#dialog').dialog('open')){return false} ok, this commandLink is rendered as follows: a href=# id=some:long:id:j_id338 name=formName:something:j_id338 onclick=if(!jQuery('#dialog').dialog('open')){return false};A4J.AJAX.Submit('something:something'); return false; drop/a now, after displaying the dialog box, the A4j.AJAX.Submit(..) is executed, is there anyway, that I can for example, pass the whole A4J.AJAX.Submit(...) to dialog and execute it from ok option? I simply need to execute submit if and only if user clicks OK. Thank you for help JQ
[jQuery] Applying JQuery from an existing node?
Is there a way to apply JQuery from an existing DOM element? For example I have a checkbox element with an onclick handler that calls a function like this: input type=checkbox onclick=doSomething(this);/ In the doSomething(thisNode) function I want to apply JQuery to the thisNode argument rather than locate the element again using JQuery. Something like: $(thisNode).parent.css(color, red) Thanks, Matt (ps I'm quite new to JQuery so sorry if this a bit of a noob question)
[jQuery] error when updating version
Hello, After updating jquery version from 1.2.6 to 1.3.2 I get this error: Error: uncaught exception: [Exception... Could not convert JavaScript argument arg 0 nsresult: 0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS) location: JS frame :: http://www.testloc.com/static/jquery.js :: anonymous :: line 48 data: no] in IE the error is: 'object is required: jquerydimensions.js line: 443' version installed of jquerydimensions is 1.1.2 the part of the code that trigger the error is this: // -- function to bind drop events for cmp items -- / ddDropBind: function( id, section, position ){ var handler = this; //alert(id); handler.$( '#'+id ) .unbind( 'dropstart' ).unbind( 'drop' ).unbind( 'dropend' ) .bind( 'dropstart', function( e ){ if( handler.marker.icon ){ handler.marker.iconDrop = true; } $(this).after( handler.$marker ); handler.marker.section = null; handler.marker.position = null; if( handler.marker.prevSection == section handler.marker.prevPosition == position ) return; handler.marker.section = section; handler.marker.position = position; } ) .bind( 'drop', - here function( e ){ } ) .bind( 'dropend', function( e ){ } ); }, (I can copy all the code if necessary) please, can someone help me? Thank you very much, Regards, Carlos.
[jQuery] Switch between five divs
Hey. JQuery is pretty new to me. I have five div on my site. Only one of them should be visible at one time. Next to det div I have 5 links. i would like to be able to switch between them by cliking on a link (there is a link for every div). I can't figure out how to do this.
Re: [jQuery] Switch between five divs
Hello ghostrunner and all, There are two methods: show() and hide() respectively. So you just show the necessary div and hide the four others, like this: $(function () { $(#div1).click (function (event) { $(this).show(); $(#div2).hide(); $(#div3).hide(); $(#div4).hide(); $(#div5).hide(); }); }); I know it's not so handy (I'm also rather new in jQuery). Maybe someone will suggest you something else... -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: ghostrunner p...@rasmusa.dk To: jQuery (English) jquery-en@googlegroups.com Date: Friday, November 27, 2009, 7:40:17 PM Subject: [jQuery] Switch between five divs Hey. JQuery is pretty new to me. I have five div on my site. Only one of them should be visible at one time. Next to det div I have 5 links. i would like to be able to switch between them by cliking on a link (there is a link for every div). I can't figure out how to do this.
[jQuery] Re: Debuging AJAX
I was not aware that leading digits was invalid markup. Thanks. I found my problem. Looking at other examples, they were returning false in the post callback function. That fixed my issue. Does it just require a return statement of any value to properly execute that function? On Nov 26, 10:55 am, Andreas Möller localhe...@l8m.de wrote: I'm not sure whether this would be an issue with jQuery, but I'm sure you agree that setting the ID attribute of a DOM element to a value that starts with a digit is not correct, at least it does not produce valid XHTML. Best regards, Andreas
Re: [jQuery] Switch between five divs
Let's get up to speed a little then : $('#div1, #div2, #div3, #div4, #div5').click(function() { // we can use multiple selectors in one selection, just like in css, and we can give the click callback to all of them at once too $('#div1, #div2, #div3, #div4, #div5').hide(); // we can also hide them all at once, in fact most jQuery's functions may be used on a whole selection at once $(this).show(); // we've hidden all of them, but we know which one we've clicked on, it's been bound to this ; though this is just the dumb dom element, and we need to wrap it in sweet sweet jQuery }); Though I'd suggest not to hide them if you want to click them after, let's see how to do this. Now let's assume you put a div inside each of your divs to handle the content, and put any other element to get the actual click. Like that : div id=div1 a href=#div1click handler for div1/a div any content you like /div /div ... Now we can do something like this : $('#div1 a, #div2 a, #div3 a, #div4 a, #div5 a').click(function() { // now we select the direct child link in each div to handle the click $('#div1 div, #div2 div, #div3 div, #div4 div, #div5 div').hide(); // we hide all the contents $(this).closest('div').children('div').show(); // closest takes the closest element (parent or self) matching the selector, children takes the children of an element matching the selector }); Hope this gives you a good foretaste of things to come with jQuery ^^ Michel Belleville 2009/11/27 Andre Polykanine an...@arthaelon.net Hello ghostrunner and all, There are two methods: show() and hide() respectively. So you just show the necessary div and hide the four others, like this: $(function () { $(#div1).click (function (event) { $(this).show(); $(#div2).hide(); $(#div3).hide(); $(#div4).hide(); $(#div5).hide(); }); }); I know it's not so handy (I'm also rather new in jQuery). Maybe someone will suggest you something else... -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: ghostrunner p...@rasmusa.dk To: jQuery (English) jquery-en@googlegroups.com Date: Friday, November 27, 2009, 7:40:17 PM Subject: [jQuery] Switch between five divs Hey. JQuery is pretty new to me. I have five div on my site. Only one of them should be visible at one time. Next to det div I have 5 links. i would like to be able to switch between them by cliking on a link (there is a link for every div). I can't figure out how to do this.
Re: [jQuery] Switch between five divs
another very helpful method would be identify your links all with one class, your divs all with one class. This helps make use of CSS along with jQuery. HTML a href="" class="myLink" text/a a href="" class="myLink" text1/a a href="" class="myLink" text2/a // etcetera div class="myDiv visibleDiv"text/div /// added an extra class to the visible div, easy to hide this way, will see in jQuery and CSS div class="myDiv"text1/div div class="myDiv"text2/div // etcetera jQuery $("a.myLink).click(function() { var linkIndex=$("a.myLink).index(this) /// determines the index of the link you click--- starts at zero for first one $(".visibleDiv").hide().removeClass("visibleDiv"); // only ever have one div with this class so hide the whole class /// don't really need the hide()-CSS will do it for you $(".myDiv").eq(linkIndex).addClass("visibleDiv").show() // give it the visibleClassName the css alone will show the div without needing the show() function, same index as link, }); CSS .myDiv {display:none} .myDiv.visibleDiv {display:block} Your links can now be anywhere within the HTML and don't have to be within any shared containers of the div, but if they are it works the same. Using classes can simplify a lot of code as well as make CSS easy to aid what your objectives are Michel Belleville wrote: Let's get up to speed a little then : $('#div1, #div2, #div3, #div4, #div5').click(function() { // we can use multiple selectors in one selection, just like in css, and we can give the click callback to all of them at once too $('#div1, #div2, #div3, #div4, #div5').hide(); // we can also hide them all at once, in fact most jQuery's functions may be used on a whole selection at once $(this).show(); // we've hidden all of them, but we know which one we've clicked on, it's been bound to this ; though this is just the dumb dom element, and we need to wrap it in sweet sweet jQuery }); Though I'd suggest not to hide them if you want to click them after, let's see how to do this. Now let's assume you put a div inside each of your divs to handle the content, and put any other element to get the actual click. Like that : div id="div1" a href=""click handler for div1/a div any content you like /div /div ... Now we can do something like this : $('#div1 a, #div2 a, #div3 a, #div4 a, #div5 a').click(function() { // now we select the direct child link in each div to handle the click $('#div1 div, #div2 div, #div3 div, #div4 div, #div5 div').hide(); // we hide all the contents $(this).closest('div').children('div').show(); // closest takes the closest element (parent or self) matching the selector, children takes the children of an element matching the selector }); Hope this gives you a good foretaste of things to come with jQuery ^^ Michel Belleville 2009/11/27 Andre Polykanine an...@arthaelon.net Hello ghostrunner and all, There are two methods: show() and hide() respectively. So you just show the necessary div and hide the four others, like this: $(function () { $("#div1").click (function (event) { $(this).show(); $("#div2").hide(); $("#div3").hide(); $("#div4").hide(); $("#div5").hide(); }); }); I know it's not so handy (I'm also rather new in jQuery). Maybe someone will suggest you something else... -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: ghostrunner p...@rasmusa.dk To: jQuery (English) jquery-en@googlegroups.com Date: Friday, November 27, 2009, 7:40:17 PM Subject: [jQuery] Switch between five divs Hey. JQuery is pretty new to me. I have five div on my site. Only one of them should be visible at one time. Next to det div I have 5 links. i would like to be able to switch between them by cliking on a link (there is a link for every div). I can't figure out how to do this.
Re: [jQuery] Re: Superfish jQuery menu plugin RTL support
OK, you said it was navbar style not vertical style. For vertical also have to change the absolute position of the sub ul to "right" from "left". This opens sub menus on left instead of right .sf-vertical li:hover ul, .sf-vertical li.sfHover ul { right: 10em; /* match ul width */ top: 0; } In superfish.js when i did RTL I changed : $arrow = $(['span class="',c.arrowClass,'" #187;/span'].join('')), to $arrow = $(['span class="',c.arrowClass,'"/span'].join('')), Vlad Shapiro wrote: Charlie, I did tried that, it's not so simple, the float change the direction of the lists but not the location. Anyone have the actual working thing? I have this example for vertical RTL Superfish: http:2tbsp.com/node/114 Maybe it will help, Thanks again. On 26 , 20:40, Charlie charlie...@gmail.com wrote: change the LI's to float right instead of left Vlad Shapiro wrote:Ahoy! I'm trying to adjust Superfish nav-bar style menu for RTL'ed Hebrew website, Example:http://users.tpg.com.au/j_birch/plugins/superfish/#sample4but no success so far, maybe someone already have this solved? Any help will be most appreciated! Best regards, Vlad.
Re: [jQuery] Re: Hide chat content
ID's must be unique, you use ID='hide" over and over, can't do it try changing to class="hide" and corresponding jQuery adjust Jerry Johnson wrote: On Fri, Nov 27, 2009 at 1:47 PM, Scott Sauyet scott.sau...@gmail.com wrote: On Nov 27, 12:03pm, Jerry Johnson jerryhost@gmail.com wrote: $('a.#hide').click(function() { $(this).hide(); } ); What does "a.#hide" mean? Shouldn't that just be "a#hide", or better yet, "#hide"? div id='msg' tr td style='border-bottom:1px solid #00;'b(2:34:28)/b Jerry: bkgi/td What is a table row doing directly inside a DIV? -- Scott What does "a.#hide" mean? Shouldn't that just be "a#hide", or better, yet, "#hide"? Yes, you are correct. I have changed it ti #hide div id='msg' tr td style='border-bottom:1px solid #00;'b(2:34:28)/b Jerry: bkgi/td What is a table row doing directly inside a DIV? Ok, i took away the tr and td's, but, it still doesn't work.
Re: [jQuery] Get value from hidden input and use it in string
Give the input element an ID and use that in the selector: input type=hidden value=2 name=Music id=music_id / $(this).setFile('http://domain.com/asset/get/' + $('#music_id').attr('id')).play(); On Fri, Nov 27, 2009 at 11:48 AM, shapper mdmo...@gmail.com wrote: Hello, I am using JPlayer to play a sound on a page: http://www.happyworm.com/jquery/jplayer/0.2.5/demo-04.htm $(document).ready(function(){ $(#jquery_jplayer).jPlayer({ ready: function () { $(#trackname).text($(#track-01).text()); $(this).setFile('http://www.miaowmusic.com/mp3/Miaow-05-The- separation.mp3').play(); demoInstanceInfo($(this), $(#jplayer_info)); } }) }); How can I change the setFile code line to: $(this).setFile('http://domain.com/asset/get/[id]').play(); Where [id] value should be taken from the following hidden input: input TYPE=hidden VALUE=2 NAME=Music Thank You, Miguel
Re: [jQuery] jquery-1.3.2.min.js causing 400 bad request
hello i want to ask only if what websites best for jqueery tutorial i wanna learn this ! it seem its good On Fri, Nov 27, 2009 at 3:16 AM, rbishop robfromplymo...@gmail.com wrote: Hi there, hoping someone can help a strange intermittent problem. Occasionally, I am experiencing 400 bad request errors when trying to load jquery-1.3.2.min.js. I have taken the request and response headers from firebug during a failure and a success. Does anyone have more experience than myself to analyse these for me please? I can see the differences but don't know how significant they are (such as the failure one saying Content-Type: text/html). ***LOAD FAILURE*** Date: Thu, 26 Nov 2009 19:04:51 GMT Content-Type: text/html Content-Length: 20 Cache-Control: no-store, no-cache Via: 1.1 ourwebsite.com (Access Gateway 3.1.0-420) Host: ourwebsite.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: __utma=188525673.792568405.1258744191.1258744191.1258911751.2; __utmz=188525673.1258744191.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd= (none) If-Modified-Since: Fri, 06 Mar 2009 03:23:42 GMT If-None-Match: 073f8f2a9ec91:6f0 Cache-Control: max-age=0 SUCCESSFUL LOAD: Last-Modified: Fri, 06 Mar 2009 03:23:42 GMT Accept-Ranges: bytes Etag: 073f8f2a9ec91:6f0 Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Date: Thu, 26 Nov 2009 19:06:49 GMT Content-Type: application/x-javascript Content-Length: 57254 Via: 1.1 ourwebsite.com (Access Gateway 3.1.0-420) Host: ourwebsite.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: 1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: __utma=188525673.792568405.1258744191.1258744191.1258911751.2; __utmz=188525673.1258744191.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd= (none) Cache-Control: max-age=0
[jQuery] Re: csv2table
Hi Oh, there is a method using Web service to perform csv to json. For example, it is YQL. But csv2table does not support json now. Because I am busy now :(, I cannot make it immediately. # For other methods, I want to try the salvage of the data which I took in $.getScript elsewhere. On Nov 27, 7:51 am, navia markets naviamarkets@gmail.com wrote: Hi Toshiro Takahashi, Is there anyway without using server side scripting ... This is wat i am searching for more than a week . could u tell me... Thanks in advance On Fri, Nov 27, 2009 at 1:45 PM, tato t...@game.gr.jp wrote: Hi, Ram You can simplify it if you can use PHP. You acquire yahoo data in following PHP and receive it in csv2table of same domain. ?php $url=http://download.finance.yahoo.com/d/quotes.csv?s= %5EIXICf=sl1d1t1c1ohgve=.csvhttp://download.finance.yahoo.com/d/quotes.csv?s=%0A%5EIXICf=sl1d1t1... ; $data=file_get_contents($url); // for safe Tag to lt; gt; echo htmlspecialchars($data, ENT_QUOTES); ? But please be careful about security. and, csv2table HTML is follow. script src=../js/jquery-1.3.2.min.js type=text/javascript/ script script src=../js/jquery.csv2table-0.02-b-2.9.js type=text/ javascript charset=utf-8/script script $(function(){ $('#view1').csv2table({ url:'./getcsv.php', appendThead:['a','b','c','d','e','f','g','h','i'] }) }); /script div id=view1/div @see Sample: http://jsgt.org/lib/jquery/plugin/csv2table/v002/test/test.htm On 11月27日, 午後1:34, Ram naviamarkets@gmail.com wrote: Hi Toshiro Takahashi First i should say thanks to you for replying Actually i need to read data from yahoo stock quotes and show it in my website so can you guide me to get data. http://download.finance.yahoo.com/d/quotes.csv?s=%5EIXICf=sl1d1t1c1o... Pls in detail. On Nov 27, 7:10 am, tato t...@game.gr.jp wrote: By the way, the reason why csv2table cannot read the text file of the other domain is because it uses $.get method of jQuery. But I do not get along well even if I change $.get in $.getScript. When capture a TCP packet, the data body arrives,; but csv data as for the JavaScript is because is not it. The method to obtain it thought, but a person distributing json in the other domain is that it is easy first of all :p -- Toshiro Takahashihttp:// plugins.jquery.com/project/csv2tablehttp://plugins.jquery.com/... On 11月27日, 午前10:49, Toshiro Takahashi t...@game.gr.jp wrote: Hi, Ram Thank you for using my plugin. On Thu, 26 Nov 2009 02:21:19 -0800 (PST) Ram naviamarkets@gmail.com wrote: I am new to jquery Its nice in csv2table i need to get values dynamically from a particular url everyminute ... i dont know how to get from particular url ( www.websitename.com?asdfasdf.csv ) and generate table for that value. Is the 'particular url' another Domain from yuor html? You cannot read the csv when that is it. If you can process the text file of the other domain, there is a method you make it json not csv, and to access. However, json does not implement it in csv2table. If get time; I may make json2table if you are necessary. $(function(){ $('#view1').csv2table('book12.csv'); }); any help will be appreciated .. -- Toshiro Takahashihttp:// plugins.jquery.com/project/csv2tablehttp://plugins.jquery.com/...
[jQuery] Re: Applying JQuery from an existing node?
You can pass your DOM element parameter to jQuery. http://docs.jquery.com/Core/jQuery#elements Something like this: function doSomething(objCheckbox){ $(objCheckbox).parent().css(color, red) } Also remember that getting a parent is a function call (you forgot the brackets).