[jQuery] Re: Delay function to wait for post

2009-03-25 Thread Klaus Hartl
async:false may freeze the browser and is in general not a good idea unless you know that your network, server etc will 100% work. Why don't you simply put the last line into the callback as well? --Klaus On 24 Mrz., 22:40, James james.gp@gmail.com wrote: Add the {async:false} option to

[jQuery] Re: Multiple lists that should only show x amount of items until you expand them

2009-03-25 Thread Jens Bengtsson
I'm starting to think that this is not possible without having different names/classes on the different menus which makes it hard since they are generated form a resultset. On Mar 24, 8:18 pm, Jens Bengtsson poserdo...@gmail.com wrote: OK, this is what I have. Multiple lists that I can

[jQuery] Re: Multiple lists that should only show x amount of items until you expand them

2009-03-25 Thread xPheRe
I'd prefer to go with a CSS solution like this: body style #menu li a + ul li + li + li { display:none; } #menu li a.expanded + ul li { display:list-item; } /style ul id=menu li aSection A/a

[jQuery] Re: Reusing script

2009-03-25 Thread xPheRe
I would go with the common parent or the common class solutions, as weidc and Thomas said. Another way to have jQuery match your 'steps', use something on those lines: var steps = $('[class*=step]).filter(function(){ return /\bstep\d+ \b/.test(this.className) }) then steps.bind('click',

[jQuery] Re: Deleting an entire tr

2009-03-25 Thread xPheRe
Try using: $(this).parents('tr:eq(0)') or if using jQuery 1.3 or newer, you can use this one too: $(this).closest('tr') On 24 mar, 10:59, lionel28 lmarte...@haitiwebs.net wrote: Hello, I am trying to remove an entire tr row. Please, someone help me. This is what I use

[jQuery] Re: ajax timeout question

2009-03-25 Thread Martijn Houtman
On Mar 25, 2009, at 4:32 AM, comslash.com wrote: I believe you can set the value to null or 0 to not have the request time out ... but you may want to implement something on error instead of this to say attempt the search again x times then print msg server is busy or something along those

[jQuery] Delay for $get.Script() callback function

2009-03-25 Thread Maujor
The documentation for $.getScript() function explicit says: *If you load functions via getScript, make sure to call them after a delay.* [1] It is suppose that callback functions are always called after a request. So, it is suppose too that this requeriment is valid for $.get(), $.post,

[jQuery] Re: Deleting an entire tr

2009-03-25 Thread lionel28
Thanks for replying. I managed to get it. Berny Cantos wrote: Try using: $(this).parents('tr:eq(0)') or if using jQuery 1.3 or newer, you can use this one too: $(this).closest('tr') On 24 mar, 10:59, lionel28 lmarte...@haitiwebs.net wrote: Hello, I am trying to remove an

[jQuery] Jquery UI 1.7.1 Tabs - Close open tab on mouseout from overall tab group

2009-03-25 Thread jq noob
I am currently using $(document).ready(function() { var $tabs = $(#tabs).tabs({ selected: -1, event: 'mouseover', collapsible: true }); I have tried including a .mouseout(function(){ //$tabs.tabs('option', 'selected', -1);

[jQuery] Re: Tabs and tables

2009-03-25 Thread MorningZ
any valid HTML can go inside those div's that are the content tabs Your breakage has absolutely nothing to do with the tabs plugin but rather with your HTML usage On Mar 24, 11:14 pm, Joe Tseng jtseng...@gmail.com wrote: Currently I am working on an entry form that I've realized has become

[jQuery] How to extend an UI class?

2009-03-25 Thread world.qu...@gmail.com
For example if I would like to extend the progress bar, to write a text... I would extend some functions (like the initialization, and the value setter functions) and I have to call super.function (except for the text management calls) How can I accomplish this? (how to call super(...) how to

[jQuery] Re: Jquery Autocomplete Problem

2009-03-25 Thread wesley...@gmail.com
Hi, i have a question, how to manually fire the autocomplete event? input type=text id=acTxt / span class=pTxtaa/span, span class=pTxtbb/span, span class=pTxtcc/span, span class=pTxtdd/span ... $(document).ready(function(){ $(#acTxt).autocomplete(theUrl, { minChars: 2,

[jQuery] scrollto function works with static html, but not with identical generated html

2009-03-25 Thread ryan
hi all - i'm just trying to scroll an iframe without a big standard scrollbar, but have run into a confusing problem: i'm able to scroll static html pages loaded in the iframe fine, but for some reason am unable to scroll pages that have been generated by drupal or blogger in firefox. (safari

[jQuery] Jquery Validation and Autobox2 by BigRedSwitch

2009-03-25 Thread Egoman
Has anyone managed to get Validation working with Autobox2 by BigRedSwitch. I am fairly new to Javascript coding but I do have a basic understanding and have managed to get the Validation working on the form (which was really easy) as well as Autobox2 but they just won't be friends. Has anyone

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

2009-03-25 Thread eddiegroves
The changes to :visible/:hidden in 1.3.2 appears to have introduced a bug to toggle: http://dev.jquery.com/ticket/4233 and see this comment http://blog.jquery.com/2009/02/20/jquery-132-released/#comment-386734 Back to 1.3.1 for now.

[jQuery] Intelisense in VS2008

2009-03-25 Thread simonxy
Hi, I copied jquery-1.3.2.js and jquery-1.3.2-vsdoc.js files into the same directory and intelisense works, but not in complete. For example, I don't have almost any properties and methods of event object, like event.stopPropagation() or event.isPropagationStopped() and similar. Why intelisense

[jQuery] Cycle plugin adds white background in ie6 and ie7

2009-03-25 Thread Smoggy
For some strange reason in IE I get a white background added to my li tag each li has a transparent background PNG image. So it get white corners where I should see a nice textured background basically cycle changes the header of the site. which is rounded on the top works fine in both FF and

[jQuery] Re: creating search page with click for more results.

2009-03-25 Thread iskills
Thanks James - that helps quite a bit! I am now able to execute an alert, using the .live function for the added elements on the page. The issue I am now having is that the display of the order_logs element will not show. Do I need to do another .live call on that? I am a bit confused now ;)

[jQuery] window unload event too slow - delay when navigate away from the page

2009-03-25 Thread Khoa
One of the pages I'm working on at the moment is quite big, it has a huge amount of HTML elements and many of them have events bound to them. So whenever I navigate out of that page, there is a huge delay. The browser seems to be freezing during that time. And then it loads the next page (the

[jQuery] jquery.js in XUL dialog

2009-03-25 Thread Alexey Demakov
Hi all, I develop Firefox extention and like to use jQuery. It works when I use it from overlay, but doesn't when inserted in dialog: overlay xmlns=http://www.mozilla.org/keymaster/gatekeeper/ there.is.only.xul orient=vertical script src=jquery.js/ script src=myscript.js/ In

[jQuery] How to force jCarousel to scroll a certain amount of items at a time?

2009-03-25 Thread Ian
Please check the testing page: http://one.xthost.info/ian/jcarousel/test-1.html There are twelve items. And scroll: 6 was set in the configuration in order to scroll six items at a time. But it scrolls only five items and the last item ( box 12 ) is invisible. I have to scroll once again to see

[jQuery] Fix for broken nextUntil

2009-03-25 Thread johan . borestad
Hi everyone! I wanted to use nextUntil, but noticed that it was broken in jQuery 1.3.2 (I know that the plugin isn't official yet and that is wanted in the core - looking at the roadmap). Well, this line wasn't working: // If we find a match then we need to stop if ( jQuery.filter( expr, [i]

[jQuery] Need some help with a image opacity thingy.

2009-03-25 Thread MindTooth
Hello. Please take a look at this code: [code] $(.box img).fadeTo(500, 0.6); // This sets the opacity of the thumbs to fade down to 60% when the page loads $(.box img).hover(function(){

[jQuery] how to insert html returned from ajax request into dom

2009-03-25 Thread adilraufk...@gmail.com
I am new to jquery, I have a page that gets data in the form of html returned from an ajax call. I want this data to be sticked to DOM and behave asif it was always a part of the first loaded contents. Detail div id=ajaxReturnedDataDivhtml data comes here/div html data a href=#

[jQuery] How to activate autocomplete in this case

2009-03-25 Thread wesley...@gmail.com
Hi, i have a question, how to manually fire the autocomplete event? input type=text id=acTxt / span class=pTxtaa/span, span class=pTxtbb/span, span class=pTxtcc/span, span class=pTxtdd/span ... $(document).ready(function(){ $(#acTxt).autocomplete(theUrl, { minChars: 2,

[jQuery] jquery.js in XUL dialog

2009-03-25 Thread Alexey Demakov
Hi all, I develop Firefox extention and like to use jQuery. It works when I use it from overlay, but doesn't when insertede in dialog: overlay xmlns=http://www.mozilla.org/keymaster/gatekeeper/ there.is.only.xul orient=vertical script src=jquery.js/ script src=myscript.js/ In

[jQuery] window unload event too slow - delay when navigate away from the page

2009-03-25 Thread Khoa
One of the pages I'm working on at the moment is quite big, it has a huge amount of HTML elements and many of them have events bound to them. So whenever I navigate out of that page, there is a huge delay. The browser seems to be freezing during that time. And then it loads the next page (the

[jQuery] Fill the second div with data - jQuery

2009-03-25 Thread ghogilee
Hi all, I have a problem with some issue. Is it possible (and how) to make this: (I will try to explain simple as I can): It's kinda, like two select boxes, but I want to achieve same result only with two div's. 1. I have one DIV, populated with linked data from database (car makes). 2. When I

[jQuery] Want to pass a variable to the selector

2009-03-25 Thread Jens Bengtsson
This is my HTML liaDOCUMENT/LAROSATE/a (1) ul lia href=/Default.aspx?q=*amp;navigator=DOCUMENT/LAROSATE:0XD6 VRIGT0XD6 VRIGT/a (20)/li /ul ul id=DOCUMENT/LAROSATE_more lia href=javascript:toggle('DOCUMENT/ LAROSATE_more');Show less/a/li /ul /li This is my javascript function

[jQuery] Re: Want to pass a variable to the selector

2009-03-25 Thread Jens Bengtsson
Found the problem, you can't use / in the name. On Mar 25, 1:28 pm, Jens Bengtsson poserdo...@gmail.com wrote: This is my HTML  liaDOCUMENT/LAROSATE/a (1) ul  lia href=/Default.aspx?q=*amp;navigator=DOCUMENT/LAROSATE:0XD6 VRIGT0XD6 VRIGT/a (20)/li  /ul  ul id=DOCUMENT/LAROSATE_more      

[jQuery] Re: Jquery UI 1.7.1 Tabs - Close open tab on mouseout from overall tab group

2009-03-25 Thread Richard D. Worth
You may want to ask on the jQuery UI list: http://groups.google.com/group/jquery-ui - Richard On Wed, Mar 25, 2009 at 5:44 AM, jq noob sammil...@alliancecom.net wrote: I am currently using $(document).ready(function() { var $tabs = $(#tabs).tabs({ selected: -1, event:

[jQuery] Re: Two Sliders on Page :: 1 closes when the other opens

2009-03-25 Thread commarts
Mohd, I'm a newbie to javascript. Can you help me? Here is a link to the site: http://workit.637westmain.com/ Daniel On Mar 25, 1:29 am, Mohd.Tareq tareq.m...@gmail.com wrote: Hi commarts, When you are writing script to open top right slider , at the same time you need to add script to

[jQuery] Re: window unload event too slow - delay when navigate away from the page

2009-03-25 Thread johan . borestad
Hi! If you have a lot of selectors, you should probably use Event Delegation and wait for the event to bubble instead. A good example is if you have a huge table and events on every row. Instead of using $('table a').bind('click', function(){ alert('do stuff!!') }) , you just bind ONE event on

[jQuery] Re: window unload event too slow - delay when navigate away from the page

2009-03-25 Thread johan . borestad
Typo error above, a lot of selectors should be a lot of events

[jQuery] Re: [autocomplete] jquery + dwr

2009-03-25 Thread Diego Plentz
Thanks Jörn. Btw, the problem still here, because even if I do something like that: $(#city).autocomplete({ source: handleDWR }); function handleDWR(term){ TestAutoComplete.findAutoComplete(term, function(data) {return data}); } data never goes back to autocomplete to be properly rendered

[jQuery] JQuery Editor

2009-03-25 Thread daniel8250
Hello, I've recently worked with a freelancer that developed a jQuery plugin for me, he did a good job, but unfortunately - he couldn't finish it... It is a RTE (Rich Text Editor) plugin (WYSIWYG - What you see is what you get), which works pretty good, there are only a few bugs left that needs

[jQuery] HowTo Select first two characters of an li and hide them

2009-03-25 Thread 262Rui
This is My markup div class=multiple_options_caption Features/div div class=multiple_options ulli class=features11 Classic Designbr/li li class=features14 Countryside Viewbr/li li class=features17 Space for Swimming Poolbr/li li class=features21 Garagebr/li li class=features22 Spacious Garden

[jQuery] How to use ThickBox in asp.net pages?

2009-03-25 Thread Sachin
Hi, I am new to using jquery and want to understand how i can implement thickbox in my asp.net website. Is there any one who can provide me a simple example? Thanks in advance Sachin

[jQuery] Re: HowTo Select first two characters of an li and hide them

2009-03-25 Thread johan . borestad
Something like this maybe $('div.multiple_options li').each(function(){ var text = $(this).html() $(this).html( text.replace(/\d+\s+/,'') ) }) But please remove that ugly br inside your li tags and make them block elements instead to achieve the same effect. / Johan On 25 Mar, 14:03,

[jQuery] Re: [autocomplete] jquery + dwr

2009-03-25 Thread Jörn Zaefferer
Ah, sorry. source expects a synchronous return as well, doesn't help at all in this case. Jörn On Wed, Mar 25, 2009 at 2:24 PM, Diego Plentz diego.pi...@gmail.com wrote: Thanks Jörn. Btw, the problem still here, because even if I do something like that: $(#city).autocomplete({     source:

[jQuery] Re: cluetip plugin issues

2009-03-25 Thread Karl Swedberg
Hi Adam, If you want the content to be ajaxed in, then by default you need to use the rel attribute and set it to the file. you can override that by setting the attribute option to something else, e.g. .cluetip({attribute: 'href'}); hope that helps. --Karl Karl Swedberg

[jQuery] Re: HowTo Select first two characters of an li and hide them

2009-03-25 Thread info
Tank you so much for both tips - Original Message - From: johan.bores...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, March 25, 2009 2:07 PM Subject: [jQuery] Re: HowTo Select first two characters of an li and hide them Something like this maybe

[jQuery] Re: .load of content does not always include DB connection

2009-03-25 Thread Tim
Unfortunately it's in a cms, that I can't really expose. My host company is looking at the problem as I expect there are server issues. Tim On Mar 24, 5:49 pm, James james.gp@gmail.com wrote: This sounds more like a server-side issue. Are you running into highloadissues on yourdatabase,

[jQuery] Re: Intelisense in VS2008

2009-03-25 Thread MorningZ
Without more code it's hard to help, but I could venture a guess that where you are in your code that Intellisense has no idea what the type of variable/object event is to help understand that, take this sample: var s; if you went to do something with s, the compiler has no idea what kind of

[jQuery] Re: Convert js to jquery

2009-03-25 Thread mdjamal
Hi Richard, Thanks for your help, the tabs switch the class on click, but how to get the value assigned to the hidden field? Regards, Jamal

[jQuery] slide/scroller to top

2009-03-25 Thread introvert
Hello How is it possible to slide scrollbar to the top with jquery? Thanks a lot for help!

[jQuery] Re: Convert js to jquery

2009-03-25 Thread Richard D. Worth
var val = $(#searchopt).val(); On Wed, Mar 25, 2009 at 9:38 AM, mdjamal mail4ja...@gmail.com wrote: Hi Richard, Thanks for your help, the tabs switch the class on click, but how to get the value assigned to the hidden field? Regards, Jamal

[jQuery] Thickbox half-works.

2009-03-25 Thread Devin
This is my code. The problem I'm having is that when I click the thumbnail all I see the loading bar. It just hangs there animated. Interestingly if I take the rel tag out of the images it works, but it doesn't show the previous and next options in the thickbox. Suggestions? !DOCTYPE HTML

[jQuery] aborting a $.getScript() request

2009-03-25 Thread Maujor
I have the following AJAX request. $(document).ready(function() { var iconLoading = $(' mini.gif '); var pluginLoaded = $('Plugin ready'); var requestScript = function() { $(iconLoading).insertAfter('#my_button');

[jQuery] Re: Need some help with a image opacity thingy.

2009-03-25 Thread Karl Swedberg
Hi there, You could use the hoverIntent plugin or update the script with suggestions posted here: http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Mar 25, 2009, at 8:00 AM,

[jQuery] Re: How to use ThickBox in asp.net pages?

2009-03-25 Thread MorningZ
What do you feel the difference would be from their provided examples? http://jquery.com/demo/thickbox/ it's looking for img tags with the class of thichbox so if you had img class=thickbox .. / or asp:image runat=server cssclass=thickbox .. / it wouldn't matter to the thickbox

[jQuery] attr(href) giving full path instead of relative in IE

2009-03-25 Thread Shane Riley
I'm wanting to read in the exact string that's contained in an anchor's href attribute in order to use it as the POST variable list for an Ajax call to a PHP script, however in IE6 and 7 the string read from the href attribute ends up being the absolute path, not just the href attribute. Here's

[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-25 Thread Martijn Houtman
On Mar 25, 2009, at 4:32 PM, Shane Riley wrote: I'm wanting to read in the exact string that's contained in an anchor's href attribute in order to use it as the POST variable list for an Ajax call to a PHP script, however in IE6 and 7 the string read from the href attribute ends up being the

[jQuery] simplemodal help - dynamic load of modal content breaks close button

2009-03-25 Thread dbonneville
I have an include that contains all the HTML for the modal dialogue content. In the HTML, I also have a close button with the class simplemodal-close attached to it, which triggers the close function. That works great. However, I decided to load the snippet via jquery.get. It loads in just fine.

[jQuery] Re: jQuery.preload - Getting Link Mode To Work

2009-03-25 Thread Nic Hubbard
Thank you! This did the trick. I didn't realize that how I had it would only load up the first match. I appreciate the help! On Mar 24, 6:05 pm, James james.gp@gmail.com wrote: Try replacing this line: var $links = $('#artistsColumns a').attr('rel'); with: var $links = [];

[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-25 Thread Shane Riley
Thanks for the article link, but your proposed change isn't valid JQuery, is it? My exact jQuery code to read in the value looks like this: pageID = $(this).attr(href); Adding what you suggested to make it $(this)[0].attr(href) will not do anything apart from force the link to be followed. I

[jQuery] one check box to select entire group

2009-03-25 Thread Andy
Hey guys, I have a table where the header has check boxes so if you click on that, it will select all of the other checkboxes in that row. The issue I have, it's not a select all checkboxes, but ones that have a specific naming convention. Example. If my header is named ckb_category1 I need

[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-25 Thread Martijn Houtman
On Mar 25, 2009, at 5:04 PM, Shane Riley wrote: Thanks for the article link, but your proposed change isn't valid JQuery, is it? My exact jQuery code to read in the value looks like this: pageID = $(this).attr(href); Adding what you suggested to make it $(this)[0].attr(href) will not do

[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-25 Thread Shane Riley
Ha! I looked at your post too fast, and didn't notice that it was pure Javascript. Sorry. I'll try it and see. The way I currently have it will not work with javascript turned off either. I'm doing it this way only because the client is requiring the user to have Javascript enabled to use the

[jQuery] Re: Need some help with a image opacity thingy.

2009-03-25 Thread MindTooth
Thank you so much. That fixed it completely. Just asking, could you provide some info regarding IE compatible. Since now my PNGs has rough edges. Looks life som chaiw saw blades. Birger :) On Mar 25, 3:52 pm, Karl Swedberg k...@englishrules.com wrote: Hi there, You could use the hoverIntent

[jQuery] Re: IE7 returning 0 for attr(width) on an img with width set

2009-03-25 Thread nabrown78
Aha! The problem was that the li elements which contained the images were set to display:none in the CSS. I guess I can work around that. On Mar 25, 10:47 am, nabrown78 nabrow...@gmail.com wrote: Hi All, I have the following code: $('#slides img').each(function(i){//calculate margins and wrap

[jQuery] Re: one check box to select entire group

2009-03-25 Thread MorningZ
Your description of your HTML isn't very clear, but none the less this could work: $(selector for header checkboxes).click(function() { var chk = this; $(input[id^=' + chk.id + _item']).each(function() { this.checked = chk.checked; }); }) On Mar 25, 12:12 pm, Andy

[jQuery] Re: Need some help with a image opacity thingy.

2009-03-25 Thread MindTooth
Thank you so much. That fixed it completely. Much appreciated. Just asking, could you provide some info regarding IE compatible. Since now my PNGs has rough edges. Looks like som chainsaw blades. Birger :) On Mar 25, 3:52 pm, Karl Swedberg k...@englishrules.com wrote: Hi there, You could

[jQuery] Re: IE7 returning 0 for attr(width) on an img with width set

2009-03-25 Thread MorningZ
Use this_img.width() instead http://docs.jquery.com/CSS/width On Mar 25, 11:47 am, nabrown78 nabrow...@gmail.com wrote: Hi All, I have the following code: $('#slides img').each(function(i){//calculate margins and wrap                 var this_img = $(this);                 var imgMargin

[jQuery] why does load cost so much time?

2009-03-25 Thread Samuel
Hi, recently I changed my ajax returned content format to html pieces, using a load() function with an expect of time decreasing used for dom manipulation. On the contract, it could be even longer than the previous xml processing time. After a debugging with firebug, I found the function data()

[jQuery] Attribute selector

2009-03-25 Thread Lay András
Hello! I'd like to set a css property on every table, that have style=table-layout: fixed attribute. I tried this, but don't works: $('table[style=table-layout: fixed]').css('background-color','#DD'); With id attribute works: $('table[id=mytable]').css('background-color','#DD'); But

[jQuery] Re: scrollto function works with static html, but not with identical generated html

2009-03-25 Thread ryan
i forgot to mention that the temporary scroll button i've set up is a h1scroll down test/h1 in the lower right. i apologize if i'm missing something really obvious here, but really don't understand how javascript can operate differently on two html pages that appears to me to be identical. - r

[jQuery] Multiple AJAX requests using jQuery

2009-03-25 Thread jakenoble
Hi I am trying to use jQuery's AJAX functionality to make a progress bar. A request is submited via AJAX, which starts importing data to a database. Once submited another AJAX request is called on an interval which checks the progress of this import, a progress meter is then updated using this

[jQuery] Re: HowTo Select first two characters of an li and hide them

2009-03-25 Thread benjamin.josefus
li class=features22 Spacious Garden br/li Why don't you put the Metadata into one of the appropriate attributes like id? If you do so, any of your li Element is addressed by that and could easily be handled. And please don't use the br if there's no proper use for it

[jQuery] looping through json and adding dom elements (options)

2009-03-25 Thread iceangel89
i am new to jquery and what i intend to do now is to load json from server and then based on the json, remove all options from a drop down and populate it with new items from the json. something like a cascading drop down. i dunno if the json outputted is correct? do i need something like

[jQuery] IE7 returning 0 for attr(width) on an img with width set

2009-03-25 Thread nabrown78
Hi All, I have the following code: $('#slides img').each(function(i){//calculate margins and wrap var this_img = $(this); var imgMargin = Math.round((550 - (this_img.attr(width) + 35))/2) + 5; this_img.wrap('div class=wrap0 style=margin-left:' +

[jQuery] Jquery Tabs shown Horizontally in Firefox but shown Vertically in IE...?

2009-03-25 Thread Martin
Hello, I am using Jquery Tabs in a webpage and the problem I am having is that the tabs are shown correctly in Firefox (Horizontally), but incorrectly in IE (Vertically). Does anyone know a simple solution to this problem? My html is very vanilla (see below) div id=tabs ul class=holder lia

[jQuery] Re: Attribute selector

2009-03-25 Thread Karl Swedberg
Hi Lay, You could do it like this: $('table').filter(function() { return this.style.tableLayout == 'fixed'; }); Not sure what happens when you try it in a browser that doesn't support the tableLayout property, though. --Karl Karl Swedberg www.englishrules.com

[jQuery] Re: HowTo Select first two characters of an li and hide them

2009-03-25 Thread info
Im working on the frontend of an old proprietary system that trows those br / before closing the li so i dont have a way to change that ... - Original Message - From: benjamin.josefus b...@jfoot.de To: jQuery (English) jquery-en@googlegroups.com Sent: Wednesday, March 25, 2009 2:38

[jQuery] Re: why does load cost so much time?

2009-03-25 Thread Samuel
supplement more information on the issue. $('.words') have html data, ie, this node is not empty, so it must cost some time to remove the children. I made tens of tests, and the average of data() function time is around 500ms, which must be too high. It's possible for me to use a iframe to

[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-25 Thread Karl Swedberg
Hi Shane, IE has a second flag argument for getAttribute that, when set to 2, is supposed to get the literal value of the attribute rather than their special-sauce value. So, this.getAttribute('href', 2) *should* get the relative href. (note: no need to do $(this)[0] ; this works just

[jQuery] Re: IE7 returning 0 for attr(width) on an img with width set

2009-03-25 Thread MorningZ
yeah, .width() gets or sets the computed width so in your case, grabbing the attribute makes more sense for your situation On Mar 25, 1:38 pm, nabrown78 nabrow...@gmail.com wrote: But for that you have to wait until all the images have actually loaded. I thought it would be faster to get

[jQuery] jqmodal Ajax issue

2009-03-25 Thread Tad
Hello, I'm new to jquery and jqmodal. I have a script that runs fine except when the URL (href) of the anchor tag is Blank or #. so what I want to do is check for that possibility and stop the Jqmodal from acting or put up an error message, without my page being messed up. I've tried to use

[jQuery] Re: creating search page with click for more results.

2009-03-25 Thread James
I don't see the issue, but I do see something that might affect it. Try: $(.vieworderdata).live(click,function() { $(.order_logs1).show(slow); return false; // -- added this line }); Since you're clicking on a a link, the return false tells the

[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-25 Thread Shane Riley
Karl, I'm pretty sure I'm reading you right, but are you saying that by all accounts JQuery should account for this and return the string- literal value of href and not IE's absolute path? If so, it's not working properly. I wish I could show you the live code, because it's probably easier to

[jQuery] Re: element type of matched id

2009-03-25 Thread James
$(#foo)[0].nodeName; On Mar 25, 8:15 am, Brad nrmlcrpt...@gmail.com wrote: I'm working on a page that dynamically changes many form elements. Because of the way that different browsers style disabled or readonly text inputs, I'm swapping the input with a span that displays more consistently.

[jQuery] element type of matched id

2009-03-25 Thread Brad
I'm working on a page that dynamically changes many form elements. Because of the way that different browsers style disabled or readonly text inputs, I'm swapping the input with a span that displays more consistently. I don't need to submit those fields. However, when I do this the affected

[jQuery] Re: element type of matched id

2009-03-25 Thread Brad
Thanks for this too. I was looking for the documentation for .is the other day and couldn't find it. On Mar 25, 12:26 pm, jerone jeron...@gmail.com wrote: You can do:   $(input#foo)   $(span#foo) or you can use the is function:http://docs.jquery.com/Traversing/is#expr  

[jQuery] Re: IE7 returning 0 for attr(width) on an img with width set

2009-03-25 Thread nabrown78
But for that you have to wait until all the images have actually loaded. I thought it would be faster to get the attribute. Is that wrong? On Mar 25, 11:39 am, MorningZ morni...@gmail.com wrote: Use this_img.width() instead http://docs.jquery.com/CSS/width On Mar 25, 11:47 am, nabrown78

[jQuery] Traversing nested lists not working in IE

2009-03-25 Thread Andrew
HTML: ul li/li li/li ul li/li /ul li/li /ul JS: $(ul li).click(function(){ $(this).next().doSomething(); }); When I click on any li that has an li after it, that next li will 'doSomething'. But, when I click on the li that has a ul after, only in IE, the ul is

[jQuery] Re: element type of matched id

2009-03-25 Thread Brad
Exactly what I need. Thanks! On Mar 25, 12:25 pm, James james.gp@gmail.com wrote: $(#foo)[0].nodeName;

[jQuery] Re: element type of matched id

2009-03-25 Thread jerone
You can do: $(input#foo) $(span#foo) or you can use the is function: http://docs.jquery.com/Traversing/is#expr if($(#foo).is(span)){ // code }else if($(#foo).is(input)){ // code } On 25 mrt, 19:15, Brad nrmlcrpt...@gmail.com wrote: I'm working on a page that dynamically

[jQuery] Re: jqmodal Ajax issue

2009-03-25 Thread Alexandre Plennevaux
1/ i would make sure the div exist before initalising the jqModal, so add the jqm initialisation to your createDiv function or through a callback executed when the createDiv is done.2/ for your specific question: your check is incorrect. The good use would be to use jqmodal onShow() callback and

[jQuery] s3Slider IE opacity question

2009-03-25 Thread Matt
Hi All, I'm trying to make use of the s3Slider plugin. It works great for me in FF and Safari. However in IE7 and 8, the opacity i set shows up correctly for the initial image/slide, but each slide after that is at 100% opacity over the image. Does anyone have any idea what would cause this to

[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-25 Thread Shane Riley
After replacing $(this).attr(href) with this.getAttribute(href, 2) I get the same result. If I output the attribute, IE still shows the absolute path. On Mar 25, 2:21 pm, Shane Riley shanerileydoti...@gmail.com wrote: Karl, I'm pretty sure I'm reading you right, but are you saying that by all

[jQuery] Re: Traversing nested lists not working in IE

2009-03-25 Thread Richard D. Worth
That html isn't valid. The nested ul element can't be a child of a ul. It needs to be a child of an li, like so ul li/li li ul li/li /ul /li li/li /ul - Richard On Wed, Mar 25, 2009 at 1:50 PM, Andrew andrewgtibbe...@gmail.com wrote: HTML: ul li/li li/li ul

[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-25 Thread Karl Swedberg
Hi Shane, Yes, I believe you're reading me right. Strange, though. I'm not able to reproduce the problem you're having. Take a look here: http://test.learningjquery.com/href.html In IE 7 for #1 and #2 $(this).attr('href') is reporting the actual text string of the href attribute while

[jQuery] Re: Traversing nested lists not working in IE

2009-03-25 Thread Andrew
Stupid standards. :) That's what I suspected. Thanks Richard. On Mar 25, 2:08 pm, Richard D. Worth rdwo...@gmail.com wrote: That html isn't valid. The nested ul element can't be a child of a ul. It needs to be a child of an li, like so ul   li/li   li     ul       li/li     /ul   /li

[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-25 Thread Shane Riley
Alright, so your example shows the actual strings for all three values in Safari, and in IE7(Vista) it shows the absolute path for #3. After looking back at my code, I'm actually loading in the links via Ajax when the page is loaded, so they're not in the original document. So I'm guessing that

[jQuery] Re: looping through json and adding dom elements (options)

2009-03-25 Thread Eric Garside
Ice, I just recently released a plugin that might suit your needs. It's basically a way to transmit HTML as JSON for this exact kind of thing. Check out: code.google.com/p/hsjn Taking the case you gave, if you change the JSON your returning to: [['option', {value: 1}, 'Physics'],['option',

[jQuery] Detect when all ajax queries launched by for have finished

2009-03-25 Thread Jsbeginner
Hello, I've got a script that takes all the elements of a list and on click of a button it runs an ajax query for each item. It all works fine however I would like to have a searching message during the search and a finished message after the search has finished, but I can't think how to

[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-25 Thread Karl Swedberg
Well, the string manipulation is pretty minimal. Just use this.pathname -- or some combination of this.pathname, this.hash, and this.search if necessary. The one problem with this.pathname is that IE and Opera omit the initial slash while FF and Safari include it. But that's not hard to

[jQuery] Re: Detect when all ajax queries launched by for have finished

2009-03-25 Thread MorningZ
This is totally off the cuff and untested, but http://paste.pocoo.org/show/109610/ should work On Mar 25, 3:20 pm, Jsbeginner jsbegin...@monarobase.net wrote: Hello, I've got a script that takes all the elements of a list and on click of a button it runs an ajax query for each item. It

[jQuery] Re: attr(href) giving full path instead of relative in IE

2009-03-25 Thread Shane Riley
Right, it's not hard, it was just unexpected is all. I guess I've gotten used to JQuery working the same in all browsers. I've got it working now with some old-fashioned Javascript. Thanks! On Mar 25, 3:20 pm, Shane Riley shanerileydoti...@gmail.com wrote: Alright, so your example shows the

[jQuery] Re: simplemodal help - dynamic load of modal content breaks close button

2009-03-25 Thread Eric Martin
If you get the data and then use it in the dialog, it will bind the simplemodal-close class. Otherwise, you have to do it manually in the onShow callback. The following will auto-bind: $('#mylink').click(function (e) { e.preventDefault(); // load the contact form using ajax

  1   2   >