Changing css of :after pseudoclass
Hi, In my stylesheet have a css rule for an element with the :after pseudoclass. Is it possible to change the this CSS with jQuery? For example, in my CSS I have .price:after { content:" EUR"; font-weight:bold; } When I try the following in my JavaScript file $('.price:after').css({"font-weight":"normal", color:"blue"}) nothing changes.
[jQuery] jQuery i18n
Hi guys, i need to develop an aplication with i18n, so i want to ask you what do you think is the best way/plugin to accomplish i18n l10n with jQuery? by the way, i need to have multiple languages,so a bilingual solution won't work for me :/
AjaxUpload: why have to click twice?
Hi all, The code below uploads files to the server using AjaxUpload.2.0.min.js But you need to click several times on the “Add File” button for the OS window (where to pick the file you want to upload) to show, instead of clicking just once. Also, if you click once in the link and then you move the mouse out of the red area and click (out of #upload_files), and last you click back in the link, it works, the OS window opens .. but why do I have to do this? Is that AjaxUpload will not be initially
[jQuery] [Validate] hide errors until field has focus
I am probably missing something, but I would like to with the Validation plugin be able to hide the errors and when someone blur/ focus/clicks on the field then they see it. I am basically emulating Flex/CF Flash forms in error display. I do have an ancillary question which is Ideally would like to place the error message next to the field that threw the error. I think my jQuery knowledge is lacking because I am not sure within errorPlacement do this error.appendTo( element ); and perhaps this is
[jQuery] [validate] display errors with a transition...
I've just started using jQuery validate and as seems to always be the case when trying to add new functions and learn new stuff... I'm on a deadline. My designers really want me to have the validation "slide up and slide down when the messages display. They have also want the error messages to float over the existing design and not mess with the page layout. Is there some way I can use the combination of options available with validate to accomplish these animated transitions for displaying the user
jQuery simple expand/collapse list: problem in IE8 with static page height
Hi there, I'm a bit new to jQuery and have been trying to make an expand/collapse (essentially accordion) list. So far, everything works and looks fine in Firefox, Safari, and Chrome, but in IE8, the page height is static when it loads, with a page height being as if all headers in the list were expanded. The expand/collapse functionality works, but as you can imagine, there is this big gap of space after the list. The html markup uses <h2> tags for the always-visible header portion and a <div> for
Disabling a double click on a submit button
Greetings, I wrote a simple jquery snippet to prevent a double click on a submit button and it works. Button id = 'swl_submit'.<script type="text/javascript"> $(document).ready(function() { $('#swl_submit').click(function(){ $(this).attr('disabled', 'disabled'); setTimeout(restoreButton,1000); }); }); function restoreButton(){ $('#swl_submit').attr('disabled',''); } </script> This works fine. Then, I thought I could shorten this up a bit by adding the code in my restoreButton
[jQuery] Calling WCF services using jquery?
Hi All, I'm wondering if anyone can advise me or steer me to some useful links... I'm doing some research about MS WCF 3.5 web services and how it can be used for json-based web services. All of the examples I'm finding use the asp.net ScriptManager tag on a server side page so that a js proxy for the web service methods gets created on page load. I don't want to use asp.net for page generation. I'm looking for an example of how to use jquery in a non-asp.net rendered page to make calls to the WCF
How to detect combination keycode
$(document).keydown(function(e) { console.log('key code is: 'e.which); });I know how to find out which key user use, but how to do it when they use combination key? for example: "CTRL + C", "CTRL + V" and so on.
[jQuery] Attribute renaming
I have tags like this: <select id="academic_from_month-0" > <select id="academic_till_month-0" > since the ids are variable in length, I would have to find out where the lastindex() of "-" is remove that and replace it it with the new value. My problem is the syntax, is there some kind of Jquery way to do this? Thanks
[jQuery] cross domain XML with ajax
Hi! I'm writing an OGC/WMS Viewer using jQuery. One task I need to accomplish involves making a getCapabilities request against a Web Mapping Service, which responds with some XML. I know that the $.ajax function allows me to get JSON from another domain, but is there a way to get XML from another domain? I've tried various permutations of data types, and the $.ajax call with the "jsonp" call gets closest--it returns the XML, but since it's not true JSON, the browser complains. Is my only option
[jQuery] [ANN] Downloadable Visual jQuery
Hi All, At long last, I have put together a downloadable Visual jQuery package. Simply go to <a href="http://www.visualjquery.com">http://www.visualjquery.com</a> and click "Download." By default, the package comes with the most recent HTML, but you can easily add other versions by just saving any of the versioned HTMLs into the same directory. I have also uploaded the docs for 1.1.1.<br clear="all"> -- Yehuda Katz Web Developer | Wycats Designs (ph) 718.877.1325 _______________________________________________
[jQuery] .reset() methods for forms
Hello there. As I mentioned in my comment at http://www.learningjquery.com/2007/08/clearing-form-data#comment-9943 I think it would be useful to have a reset method in the core, along the lines of: $.fn.extend({ reset: function() { return this.each(function() { $(this).is('form') && this.reset(); } } }); For a small amount of extra code in the core, people could then reset their forms and carry on the chain ala. $('form').foo().reset().bar(). -- Best wishes, Dave Cardwell http://davecardwell.co.uk/javascript/jquery/
jQuery & Google Calendar (Events)
Hey Folks! I couldn't find any solution or help but maybe you can answer my question. I know there must be a solution somewhere to show my visitors of my webpage a event list from my google calendar. There's "FullCalendar" out, but i don't need a calendar, i only need the events + date. The solution has to work with Google Calendar. Any help or ideas?
statuscode and error callbacks
I just want to query the behaviour of the new 1.5 ajax status codes. For example, what appears to be happening is that if I declare a handler for a 500 in statusCodes and also set an error handler, my 500 handler is never called, only my error handler is. If I remove the error handler and repeat, my 500 handler is called. This is kind of backwards to what I'd expect, I would expect a specific http status code handler to override the success/error handlers. The success error handlers would only be
[jQuery] TableSorter sorting date column
Hello, I see that by default the tableSorter plugin can easily sort date+times formatted as: Jan 01, 2000 00:00 AM. But once you take off the time portion it sorts alphaneumerically. How can I get it to still sort properly while just using the date portion (e.g. Jan 01, 2000)? Thanks, Chris. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
How?: Dropdown menu selection dynamically alters selects of other dropdown menus on same page?
Hi I have a project where I need a selection of one dropdown menu may affect the select of multiple other dropdown menus on the same page. First, a table is generated, and within each row, it contains a dropdown menu. Assume: Rows A, B, C, etc..., and Dropdown selection: 1, 2, & 3 If dropdown in Row A selects 2, then I want the selection of dropdowns in rows B & C to dynamically change to 2. And if in Row C user selects 3, then the selection in dropdowns in rows A & B should dynamically change
Jquery and fancy dropdown menu
Hello, I'm using a jquery anything slider in combination with a fancydropdown menu. But we are having a problem. The slider doesn't work anymore. Does anyone know how we can solve the problem? I hope that it is a small problem and can be fixed. Thanks in advance! The site is online http://www.a-nnika.be/site2 There is an imageslider in the header but this doesn't work in combination with the fancy dropdownmenu.
Using toggle function - hide on load as default
Hi, I'm rather new to jQuery though I would like to learn more... Anyway, I am using some code that someone else wrote so I claim no credit here for the code. It works great and I've managed to persuade to work in Wordpress but I have one thing I would like to change. Basically the text I am trying to toggle is "shown" on page load - I would like it to be "hidden" until the user clicks on the link to make it appear. Here's the code: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
[jQuery] simple: how to dynamically set dropdown's selected menu item
i can't seem to find example for: simple html dropdown <select id="myDD"> <option value="hi">hi</option> <option value="hello">hello</option> </select> jquery code needed to set *selected item* to "hello".... based on knowing the value of "hello" -- View this message in context: http://www.nabble.com/simple%3A-how-to-dynamically-set-dropdown%27s-selected-menu-item-tp18185695s27240p18185695.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Select dropdown by text
I am trying to select a dropdown item by text. The html <select name="ddlTest" id="ddlTest"> <option value="1">One</option> <option value="2">Two</option> <option value="3">Three</option> </select> To select option "Two", my jquery code is like this var value = $("#ddlTest option:contains('Two')").val(); $('#ddlTest').val(value) But I don't think using "contains" is the right approach to find the value. Is there a better way to select a dropdown item by text? TIA.
$('<span>').text('new text') not working in IE
Has anyone seen this before.. var myText = 'blah'; $('<span>').text(myText); The above correctly sets the text of the span to blah in all browsers except IE. The only way I've gotten it to work in IE is... $('<span>' + myText + '</span>') Not the worst hack, but all the extra typing is adding up. Any ideas? TIA
Help optimizing $.html() function
ok here is the deal, the text takes approx 60ms to go through all the loops. however, '$("div#content").html(content)' takes over 7 seconds to load, which isn't a problem except that the browser freezes up while this occurs, thus making my loading gif icon freeze up as well. i would like to hear suggestions from the jQuery community on what the best approach to solving this problem is. loading the list elements individually using the $.html() function in the for loop is not an acceptable solution
[Ajax] sending textarea val with line-breaks included
Hey Guy, I´m using the ajax function ($.ajax()) to send the value of a textarea to an php file. This works fine. But the data, which i`m sending to to the php file, is without any line-breaks. Here is my ajax request: var myTextareaVal = $('#message-textarea').val(); $.ajax({ type: "GET", url: "myPhpFile.php", data: "text=" + myTextareaVal, cache: false, dataType: "html", success: function(data)
[jQuery] how to align right (not left) images with variable widths?
Hi! I was implementing this http://malsup.com/jquery/cycle/after.html here: http://relojurbano.com.ar/actual.html it works ok (you can see it clicking "siguiente" & "anterior" at the left side menu/descriptions) but... I need the images (that have variable widths) aligned to right, not left... I have tried using some css variants and nothing works... float, text- align, right:0... then looking at the jquery.cycle.all.js file I saw a lot of "left" strings... maybe I need to change some of them, to
Checking if certain Radiobutton is checked
I've got the following code: <input type="radio" runat="server" name="testGroup" id="test1" /><label for="<%=test1.ClientID %>" style="cursor:hand" runat="server">Test1</label> <input type="radio" runat="server" name="testGroup" id="test2" /><label for="<%=test2.ClientID %>" style="cursor:hand" runat="server">Test2</label> <input type="radio" runat="server" name="testGroup" id="test3" /> <label for="<%=test3.ClientID %>" style="cursor:hand">Test3</label> And then this to check if the 2nd radio
[jQuery] Superfish 1.4.8 w/ Supposition
I'm using 1.4.8 with Supersubs...great plugin! One issue I'm running into is getting Supposition to run with it- am getting this JS error: $.superfish is undefined (line 57) (Mac 10.5 w/ FF 3) This works fine with Superfish 1.4.1, of course. I've tried it with Supersubs turned off with the same result. It appears as though the superfish object is not being passed and I'm at a loss as to how to pass it in. Thanks...
Drag and drop with php/Mysql Working example
Hi everyone! I have managed, with some help, to get a working example of a drag and drop with multiple columns that stores everything with php/mysql. However, since I've made sort of a ugly solution, when I drag a lot of items in a number of different directions and hit refresh not every items has been updated. My solution was to make a loop, which probably is where the problem lies. It has to loop through everything so many times that it takes a lot of time, and everything isn't sent before I hit
Toggle start as hidden?
I am using the toggle function to hide and show a div. Is there any way I can get the div to be hidden on the page load, and then when when toggle is called, it will show it (since it would be currently hidden). The way I toggle works for me so far, the div is visible as default, and then once the toggle is activated, it is hidden. I want it to be the opposite. Thanks Imfromwales
full xml file comparison against another xml file
Ok. I have been searching for a couple of days for previous development of a script that will compare two xml files against each other. But have come up short handed. I take it that full file comparison is not done normally within the web world. I have seen craterfulls of applications for the 'desktop', but none for the web world. The xml files are formatted in such a way as the data that each node contains is in the attributes of that node. <node attribute="pickles" attribute2="donuts" /> What
Why does the jQuery "val()" method strip carriage returns from a textarea value ?
Does anyone know why the jQuery "val()" method strips carriage returns from a textarea value ?
[jQuery] [validate] Select box help
I have a form that has a few select boxes and have been unsuccessful at getting them to validate on change, or tabbing away from the field. The first field is a month field, and the first option is blank the select is designed like so <select name="dobmonth" id="dobmonth" class="inputNormal" style="width: 199px;"> <option value="">Month</option> <option value="1">January</option> <option value="2">February</option> <option value="3">March</option> <option value="4">April</option>
Downloaded zip file damaged
I've setup a custom theme on the jqueryui site, and I'm trying to download it since yesterday, but I always get a damaged zip file...is anyone experiencing the same issue?
html and innerHTML method
Hi guys i have this HTML structure <table> <tr><td></td></tr> <tr><td></td></tr> </table>i need to take all the tr element in HTML format, so i wanna take this output " <tr><td></td></tr>" in string format. i do this: jQuery("table tr").html() but the result is "<td></td>" how i can take the parent too? I hope is clear thanks in advance!
Sortable - sort another list in same order at the same time
How can I sort two lists in the same order at the same time? I have two lists (UL) like this: <UL id="list1"> <LI>TEXT1</LI> <LI>TEXT2></LI> <LI>TEXT3></LI> <LI>TEXT4></LI> </UL> <UL ="list2"> <LI>IMAGE1</LI> <LI>IMAGE2></LI> <LI>IMAGE3></LI> <LI>IMAGE4></LI> </UL> I have implemented sortable so I can sort both lists but I want to sort them in the same order. So i want list2 to update when list1 has been sorted, or even better - sort list2 at the exact same time as list1, meaning that when I drag
Largest Width of All Elements
What would be the best way to find the largest width of all child elements? Yes, the containing block should be the largest width but in my case there could be some overflow that is larger than the container. Thanks!
[jQuery] toggle show hide - help
Hi, Im working my way through the book 'jQuery in Action' and i'm a bit stumped with a block of code and how it works. The Code : $(function(){ $('li:has(ul)') .click(function(event){ if (this == event.target) { $(this).children().toggle(); $(this).css('list-style-image', ($(this).children().is(':hidden')) ? 'url(plus.gif)' : 'url(minus.gif)'); }
[jQuery] using draggable from within a container with over-flow:hidden.
I'm using jcarousel to display a list of images that I want the user to be able to drag to certain drop targets. The code looks like: ...children('img').addClass('flashCatalogPage').draggable({ helper: 'clone', opacity: .5 }); The problem is, the container for the jcarousel uses the css attribute over-flow:hidden to hide elements further down in the list. I tried playing with the container attribute but that doesn't seem to work. Does anyone have any suggestions?
[jQuery] jqDock doesn't do anything?
Hello, I'm trying to find some support for this problem I'm having and there isn't much on google regarding jqDock. I have created just a basic test page using jqDock, but nothing happens. My images appear as normal, but nothing happens when I mouse over them (except the title shows as normal). All my paths are correct, and no errors are displayed. I have tried in both IE 6 and FireFox, and both have the same result. It is an intranet site at work, so I can't link to it, but here is my source: <html>
Dynamically Adding Form Elements
Hi, I'm currently working on as per topic. I've taken the codes from here. It works perfectly but I need to add more fields than stated in the post. If I add in another field, only one field gets the increment. The other doesn't. Eg. <form id="myForm" method="get" action="test.php"> <div id="input1" style="margin-bottom:4px;" class="clonedInput"> Name: <input type="text" name="name1"> Tel: <input type="text" name="tel1"> </div> <div> <input type="button" id="btnAdd" value="add another
Next Page