[jQuery] How do you return the index of an option selected
How do you return the index of an option selected: <select> <option value="A">a</option><option value="B">b</option><option value="C">c</option> </select> I want to return 0, 1 and 2 when the above optiones are selected
[jQuery] setting selected in Safari
Hi, following code works in Firefox, but not Safari, why? or just my Safar? can anybody test it? Thanks. A.C. $("#state option[@value='KY']").attr("selected", "selected"); <select name="state" id="state"> <option value="NY">New York</option> <option value="AL">Alaska</option> <option value="KY">Kentuky</option> <option value="IA">IOWA</option> </select>
[jQuery] interrupting a delayed effect?
hi group, I use the pause-plugin (http://blog.mythin.net/projects/jquery.php) to delay an slidedown-effect in my navigation if the user mouseovers a link. I have slightly modified it to get it to work (changing line 29 from $.dequeue(self) to $(self).dequeue() So this works fine: $('#navigation>ul>li>a').mouseover( function(){ $(this).parent('li').children('ul') .pause() .slideDown('slow'); return false; } ); but - I want to stop the timeout and ignore the
[jQuery] jqGrid update
Hi all, I have updated the jqGrid. If someone has interest, can see the new thinks here: http://trirand.com/jqgrid/jqgrid.html Enjoy Tony
[jQuery] jQuery Interface Sortable: loosing the style of dragged item
Hi, I'm quite a newbie and I'm using jQuery 1.12 and interface 1.2 (interface.eyecon.ro) and I have a strange behavior on my sortable elements : the divs I drag have no style applied to, the style comes back when I stop dragging them. Here's my code : $('#ph_columns td.sortable').Sortable( { accept: 'portlet', helperclass: 'ph_sort_placeholder', handle: 'div.portlet-header', opacity: 0.9, tolerance: 'intersect' } ); Can you
[jQuery] :not selector broken in v1.2.1?
Hi, I am running the sample from the learning jquery book chap.2 on p. 28. $('th').parent().addClass('table-heading'); $('tr:not([th]):even').addClass('even'); $('tr:not([th]):odd').addClass('odd'); It runs fine with the v1.1 that is included with the sample codes from packtpub.com. However, after I switch from v1.1 to the latest v1.2.1 (i have both files in the same dir, so all I did was change the jquery.js filename in the script), it seems to ignore the :not selector and colors the header with
[jQuery] Edit in place: only one textfield open per page
Hi, I'm using the code from the '15 days of jquery' demo of edit in place: http://15daysofjquery.com/examples/jqueryEditInPlace/demo.php JS: http://15daysofjquery.com/examples/jqueryEditInPlace/jqueryEIP.js I have a page that has 10+ eip textfields and it all works well. But when you open 2 eip textfields and you close the first opened you get an error. So I would like to make it so that you can only open one eip field at a time. Meaning that if one is already open, it will close when another is
[jQuery] DropDown list and selected Index - SelectedIndex ?
How do I go about retreiving the selected value of a dropdown list using jquery? In regular js I do this : <select onchange="f(this.selectedIndex)"> <option></option> <option></option> </select>
[jQuery] [SITE] newsweek.com
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2><SPAN class=765124821-26102007>wow, the redesigned newsweek.com uses jquery! <A href="http://www.newsweek.com/id/57485">http://www.newsweek.com/id/57485</A></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=765124821-26102007></SPAN></FONT> </DIV>
[jQuery] BlockUI Dialog + FireFox - Breaks down
Hey, When i'm trying to open BlockUI Dialog (Yes/No) few times in a row - my FireFox (v2.0.0.8) breaks down. Any solutions to this problem? If i'm trying to open BlockUI few times without that dialog - everything is ok... The same problem is not only on my page, but on BlockUI demo page also: http://www.malsup.com/jquery/block/#dialog Everything is ok with both IE 6/7. Gediminas
[jQuery] Changing form action with hidden field named action in IE causes error
The long subject says it all! If I have a hidden field named 'action', trying to change the form action attribute fails in IE7. If I change the hidden field to something other than action it works. Can anyone think of a way around this? I would like to keep the hidden field named 'action' if I can. Is this a jquery bug, an IE7 bug, a quirk in JS or am I in the wrong for naming a field 'action'? Here's some sample code to see the problem: <script type="text/javascript" src="/shared-scripts/ jquery-1.2.1.min.js"></script>
[jQuery] open file after posting data
Is it possible to open file after posting data via $.post()? Example i have form and submit link: <form> <input name="test" value="1"> </form> <a href="#" onclick="openPDF()"> And i have function: function openPDF(){ var url = some url; var posts = some kind of serializeArray(); //posting values now, here i need to post my form data to my url and next i want to see pdf. Is it possible? }
[jQuery] OT: a very simple download indicator (marquee strikes back)
<marquee direction="right">...</marquee> ;-) http://www.stilbuero.de/2007/10/26/a-very-simple-download-indicator-the-glorious-return-of-the-marquee-tag/ --Klaus
[jQuery] 1px rounded corners issue
We're (a dev at my company and I) trying to create a white inside, white outside, single pixel border around a block of content using the jquery corners plugin. We're not sure of the best approach for that, but what we've tried results in some weird artifacts on the top corners: http://www.ihwy.com/examples/corner/ Any advice on how to get the effect we're looking for? This has to work in IE and FF, FWIW. Thanks, Jack
[jQuery] Show/Hide divs depending on choice made in a select box
I have a select box with this structure: <select name="taxonomy[3]" class="form-select required" id="edit- taxonomy-3" > <option value="4">OPTION1</option> <option value="5".>OPTION2</option> <option value="984".>-OPTION3</option> <option value="983">-OPTION4</option> <option value="35">OPTION5</option> <option value="986">-OPTION6</option> <option value="25">-OPTION7</option> <option value="100">-OPTION8</option> <option value="6". >OPTION9t</option> </select> And I'd like a different div containing
[jQuery] Loop thru options of a Select box
Hi, given this, how to iterate thru the options? thanks <select name="state" id="state"> <option value="NY">New York</option> <option value="AL">Alaska</option> <option value="KY">Kentuky</option> <option value="IA">IOWA</option> </select>
[jQuery] Validating checkboxes
Hi all, how does one validate that a user checks at least one checkbox from a group of checkboxes. I have seen the example on Jörns site, but the example has the same names for all checkboxes, I cant have the same name for all checkboxes due to the backend code. Thanks
[jQuery] setRequestHeader("Accept", text/xml") - problem with
My server expects the dataType as text/xml. This is the code I use to set the the type. $(function() { $.ajax({ type: "GET", url: location.href, dataType: "xml", beforeSend : function(req) { req.setRequestHeader("Accept", "text/xml"); }, success: function(xml) { alert("success=" + xml.responseText); }, complete: function(xml) { alert("complete=" + xml.responseText); }, failure: function(xml) { alert("in failure"); } }); }); When I set Accept to "text/xml" or "xml" I see on the line going to the server
[jQuery] Newbie question on hide objects
Hello everybody, I am trying to add a comment functionality to my webapp that includes a reply possibility on each comment. Like on digg for example. I am new to AJAX, but would like to take this oportunity and to jump into cold water with that task now. My goal is to use JQuery to show and hide a dialog box which contains the form to reply on the comments. Basicaly I managed to do this, but now I have a general understanding problem. Let's say there are 100 comments there and I want to have reply
[jQuery] Saving contents
Hi, I have a need to save content of a <div id="test"></div> to some global variables and re-load it sometime later, possible with jQuery? thanks. A.C.
[jQuery] How to set selected of Select box which works with Safari as well?
Hi, I ajax load a list of options into a Select box and then set the value to 'AL', this will display the currently selected options as Alaska, it works with Firefox, but not with Safari, although the selected one is 'AL', but it does not show ALASKA in the display, it shows the first element in the list which is 'new york', why? here is the url that you can test: http://catalina.ph/test2.html $(document).ready(function(){ var s = jQuery("select#state"); s.load("http://catalina.ph/states.html", function()
[jQuery] Transparencys and Overlays
I'm having trouble understanding how various jQuery plugins show transparency and overlays over certain elements (or the whole page). I think CSS provides the ability to do this, but I'm not sure. What is the basic CSS to: 1) Put a gray, semi-transparent sheet over the whole page? 2) To do the same over just one element? 3) And to raise one element over that transparency? Much appreciated.
[jQuery] Best regex for this, getting software version numbers
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=339112421-25102007><FONT face=Arial size=2>I have these strings:</FONT></SPAN></DIV> <DIV><SPAN class=339112421-25102007><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=339112421-25102007><FONT face=Arial size=2>Firefox 2.0.0.8 (<SPAN class=339112421-25102007><FONT
[jQuery] How to Check jQuery Status
I am using jQuery to do an AJAX post. The servlet runs code to generate an Excel file. On the firing page a hyperlink appears that will display the Excel file. My problem is keeping the link from appearing before the file has finished generating. How do I use a response flag to tell the page code to display the link? -- View this message in context: http://www.nabble.com/How-to-Check-jQuery-Status-tf4697072s27240.html#a13426453 Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] jqModal and the "ESC" key?
Is there a way to get jqModal dialogs to hide when you hit the escape key? Thanks, Will
[jQuery] Jquery 1.2 API
Hello all, I've been using <a href="http://jquery.com/api/">http://jquery.com/api/</a> extensively as a reference for developing with jquery 1.1.2. Is there a comparable gui available for browsing the jquery 1.2 api? Thanks, Josh Ain ITA Software
[jQuery] Code in loop
Hi there friends!!! I'm having problems with a code here using AJAX on Jquery. When I do only one click in my object, it works fine, but, when I click again in other object the previous result of id continue stored. What I have to do to solve this problem??
[jQuery] table pagination plugin
Hi is there a good table pagination plugin out there that explains how to use it as well? I came across this example but it doesnt explain how to use it :( http://tablesorter.com/docs/example-pager.html it just shows this snippet $(document).ready(function() { $("table") .tablesorter({widthFixed: true}) .tablesorterPager({container: $("#pager")}); }); If we were getting data from a DB...will we just do a one call to the DB and then this plugin will page thru the results? or on every time user hits
[jQuery] IE bug with IFRAME?
Hi all! I have a piece of code in wich I create, with jQuery, an IFRAME and setting the src attribute: $("form").append("<div><iframe id='fileManagerWindow' src='javascript:false;' frameborder='0'></iframe></div>"); $("#fileManagerWindow").attr("src","FileManager.htm"); WIth Firefox all goes well, but with IE the second row give the error "Object doesn't support this property or method"... Calling the "FileManager.htm" page alone in a new IE window run correctly. I've tried vary alternatives but
[jQuery] Help with dynamically loading and running Javascript
Hi, I'm trying to add some HTML to a DIV (the HTML is contained in the var "data") $("#"+p_id).empty().append("<div class=\"itemWrapper\">" + data + "</ div>"); but when that HTML contains Javascript, PC IE 7 gives me syntax errors after the above call, even when the JS contains none. Here is an example of some of the HTML with JS I'm trying to load: <form onsubmit="return get(this)"></form> <table> <tr> <td><img width="100" src="images/ roman.jpg" alt="" border="0"></td> <td valign="top"> <table>
[jQuery] Article about jQuery chaining...
Yesterday I was working on some code and scratching my head on why my seemingly simple code wasn't working: $("<div>inner</div>") .appendTo("<div>outer</div>") .appendTo("body"); Only the <div>inner</div> was getting appended to the <body> tag. Then I realized why--I wasn't thinking about the jQuery chain correctly. That led me to write a blog entry today: http://blog.pengoworks.com/blogger/index.cfm?action=blog:611 For those of you who don't know why my example didn't work, go read my blog
[jQuery] Autocomplete for hierarchical data (aka a "Tree")...
Before I go about re-inventing any wheels, I was wondering if anyone's see any good Autocomplete plug-ins for handling hierarchical data organized in a tree? For those familiar with the program Quicken, I'm looking for something that provides functionality similar to the "Category" field (which allows you to start typing and then press the colon (":") to go to the children items.) I have some text data that is hierarchical in nature. I looking to add some kind of autocomplete functionality to an
[jQuery] Manipulation image objects
Hello, Suppose I load an image in the browser cache using the JS Image constructor, how safe is it to manipulate directly the resulting object (which basically isn't in the DOM) with JQuery? For instance: var img = new Image(); img = "sunset.jpg"; $("#place1").append(img); $(img).clone().appendTo("#place2"); I've tested it in FF/IE7 for Windows, it seems OK but I want to be sure. Should I rather manipulate an HTML fragment referring to this image (<img src="..." />) once I know it has been cached?
[jQuery] Scrolling a textarea to the bottom each time it's updated
Hey, I'm in need for a function that will scroll my textarea to the bottom each time it's updated, how can I do that? Thanks, Eli
[jQuery] DIV resizes in IE using show
I am having problems with showing a DIV after hiding it, but only in Internet Explorer. Initally, the div loads fine, but if i hide it and then show it again, it gets resized. Can anyone have a look at http://irish-property.ie in Internet Explorer, click on any of the hide links and then click on show. When you click on show, you will see the date div being shown but pushing the content under neath it to the right. Any ideas what I am doing wrong?
[jQuery] load a file from local file system
Hi, the $(element).load(url) works well, but is there a way load from a local file system? thanks. A.C.
[jQuery] Method addClass is not working with MS Internet Explorer (IE) 6
I am using onclick event on input type="button" to addClass, but there is no effect in IE 6, while it works fine in Mozilla and Opera browsers. I know that IE works fine with such CSS styles, since it works with my simple code without jQuery (document.getElementById('add- new-rows').className='display-table-row-group';). Please investigate. Here is the code: <form> <input type="button" name="my-button" value="Add Something" onclick="$('#add-new-rows').addClass('display-table-row-group');"/> </form>
[jQuery] Multiple animate problem
Hi all, I realised something like http://demos.mootools.net/Fx.Elements with JQuery with background image transition. But images are not resized simultaneously, so the last button sometime get down. You can see it in action on http://denon.joomlation.org More precisions ----------------------- I used a link list with images. ul>li>a>img "Inactive" images (shorter) are declared in the A element from the CSS "Active" images (larger) are in "img", into the html code The goal is to switch images with
[jQuery] Lookup doesn't work within HTML loaded with .load()
Greetings, I have a nasty surprise: jQuery (1.2.1) won't access DOM elements that have been inserted via .load() function. Example: index.html: --------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/ xhtml1-transitional.dtd"> <html><head><title>Test</title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="test.js"></script> </head><body> <div id="left" style="float: left; width: 30%"> Left </div> <div id="left" style="float:
[jQuery] ie and firefox browser test
I want to test if the browser is ie or firefox and then set the width and height of a thickbox differently depending on this. Is this considered bad practice and if so how might you do it better?
Next Page