datepicker on own img button
Hi everyone I'm using the jQuery UI datepicker and it's absolutely brilliant. But is there a way to attach it to my own button? Here's my datepicker code at the moment // UI DATEPICKER $("#due_date").datepicker({buttonImage: '/img/calendar.gif', buttonImageOnly: true, constrainInput: true, dateFormat: 'dd/mm/y', duration: 'fast', firstDay: 1, maxDate: '+5Y', minDate: '-0D', showButtonPanel: true, showOn: 'button'}); And it generates a button with calendar.gif next to the input, which is almost fine.
[jQuery] [cluetip] dynamic content (JSON) rendering
Hi all, I am trying to use the cluetip plugin to display some information I'm pulling from a $.getJSON call. Perhaps it's obvious to someone what the best way to do this is. Right now, I'm having some difficulty getting the content to display. Here's what I have: There's a hidden div, let's call it "#content", that I am using as the rel attribute of my anchor - this is the div from which the cluetip will get its contents. #content is initially empty, but in the cluetip options, I am populating the
Permission Denied Error in jquery-1.3.2.min.js
Hi everyone, I'm using an an autosuggest plugin for jQuery (plugin can be seen here: http://code.drewwilson.com/entry/autosuggest-jquery-plugin) and I keep getting a permission denied error in IE. The code works fine in Firefox, Safari, and Opera. Using the debugging tool in IE8, I've found the first line it complains on is: J.open(G,M.url,M.async) The plugin uses AJAX, calling a script located in same directory as form page, to process data as you type. I use an absolute link to the script (http://quotemyprofessor.com/_beta/process.php).
[jQuery] jTip reload issue
Hello all. I am new to jQuery, and I must say it is FANTASTIC!!!!! I am using jTips and it is working very well, but with one exception. When my page is intially loaded, everything works great. However, when I reload a DIV using AJAX, the jtips in that div do not work. I have verified the code I am using to reload the div is exactly the same (for testing, but once this is fixed it will not be). So for example, when the page is initially loaded I have: Area description goes here<br /> In this area
Div height and IE problem
Hello I am trying to adjust the height of a div using $("#mydiv").height(1000); In every browser works ok but not in IE Any ideas Thanks Ioannis
[jQuery] Zoom animation jerky not smooth
Hi all, I've got boxes with images in that I need to zoom in (i.e. expand) on mouse over. I achieve this by animating some css properties of said box, it looks a little something like this; // Magnify on mouse over. $(".thumbBox").hover(function () { var box = parseInt($(this).attr("id").substring(5, 6)) - 1; $(this).queue("fx", []); $(this).animate({ "left": x[box] - 15, "top": y[box] - 15, "width": 120, "height": 120 }, {duration: 100, easing: "easeOutCirc"}); $(this).fadeTo("fast", 1); }, function()
textStatus unavailable from ajaxError
The value of textStatus doesn't seem to be available when using the global handler ajaxError, so it doesn't appear to be possible to determine what the reason for call failure is - this is probably most evident when defining a timeout through ajaxSetup. Is anyone aware of a workaround for this, and/or is this omission slated to be addressed any time in the near future? Thanks.
validating checkboxes
I have a jsp page that contains 2 set of check boxes (these are generated with a for loop, so values are assigned at runtime). I want to make sure that at least one check box is selected from either set. I have this for validation: [code] $(document).ready( function() { $("#aForm").validate({ rules : { 'aCheckbox':{ required : { depends: function(element) { return $("#bCheckbox:not(':checked')") } } } }, messages : { aCheckbox: "select a box." } });[/code] This does not seem to work. Please help.
[jQuery] what is the license of this beautiful plugin innerfade
Under what license is innerfade plugin. This is really a beautiful plugin. Unfortunately the plugin file does not mention the license of the plugin. Thanks
[jQuery] append mailto link to orphan plain text email address
Hi, I have a div that contains simple text data with line breaks. I want to append a mailto link to the email address but so far I have not been able to select the email. The container looks something like this: <div id="myId"> Username: Johnny<br /> Email: john@organization.com </div> With the help of jQuery it should look like this: <div id="myId"> Username: Johnny<br /> Email: <a href="mailto:">john@organization.com</a> </div> My first intention was to use a filter like: $('#myId').contents().filter(':contains("@")');
[jQuery] Advanced Problem - Any takers?
I'm dynamically inserting html into a page that only contains an image. Such as... <html> <body> <img src="http://my_domain.com/my_image.jpg"/> </body> </html> my script has a large amount of html that i want to insert. the html is stored in a variable . Such as.. var my_var = "<div>HI</div>"; (the actual html is much larger and more complicated than my example) I then have.. $('body').append(my_var); which you would think would insert the html into the page. it doesn't, instead it just inserts it
[jQuery] pulling my hair out with validation plugin and radio/checkboxes
I'm using Jorn's validate plugin and have everything working great except for the 'required' error messages for radio and checkboxes. I've dug through the comments, API and examples but am stuck... What I want: o Item 1 o Item 2 Error message goes here... What I'm getting: o Error message Item 1 o Item 2 Any ideas what I could be doing wrong??? Jim
autosave to mysql DB with Jquery using Ckeditor
Hi Everyone, Not sure where i was meant to post this but i thought this area was the best for it. Just having one issue and is probably a simple fix. I am using the ckeditor in a form that push the content to a mysql database using php. I am also using a jquery function that autosaves using ajax every 20 secs. the autosave function put all the content into the DB except for the textarea that has the ckeditor applied to it. If i submit the the form by pressing the sumbit button everything works how
[jQuery] Tablesorter UI Theme Support
This is a double post, at least going to be a double post from in the jQuery Plugin list. I'm being moderated yet on that list, and it doesn't seem to get much activity. -------------------------------------------------------------------------- Hi, I'm going to post this here since the Tablesorter developer hasn't gotten back to me yet. I took a copy of the latest version in SVN and modified it to have jQuery UI Theme support. It seems to work very well and anyone is welcome to use it. Here are the
.css() reports value of "clip" inconsistently
Given: a CSS definition of this sort: div {clip:rect(0px 30px 30px 0px); /* (values set arbitrarily) */ } Using IE 8, if I attempt the following: $(document).ready(function () { alert( $("div").css("clip") ) }); The alert reports "undefined" unless the clip is defined in an inline style, i.e. <div style="clip:rect(...);"></div>. When the style is inline, it returns space-separated values, e.g. "rect(0px 30px 30px 0px)," even if the clip is defined with comma-separated values. In FireFox 3.6.12
innerHTML and 'unknown runtime error'
why this always throws "unknown runtime error" ? looks like the innerHTML has something wrong . Thanks. <div id="pageDiv"></div> $("#pageDiv").attr("innerHTML", "<a href='#' onclick='ddddd();return false;'>ddd</a>");
Multiple ajax request
Hi, I'm trying to launch two ajax requests at same time. I'm expecting result from the first later than the second. The problem is, it won't return me any result from the second request untill first one is returned. Check it out : $.post("sendMail.php"); getSendInfo(); setTimeout(getSendInfo,5000); function getSendInfo(){ $.getJSON("getSendInfo.php", function(data){ console.log("done"); }); } I'm getting response from the $.getJSON function only when the $.post is
Problem with Multi Select Move Up/Down in IE7
Hi, I am trying to write a multi select listbox where you can reorder the items in it by pressing "up" or "down" button. It seems to be running fine on most browsers but not Internet Explorer 7 though. It seems that I am not able to move the second item to the first, but if you move your mouse over to the listbox immediately after clicking the "up", the second item will move to the first. The same applies if you select multiple items and move up/down. You need to mouse over to the listbox immediately
Using .queue()
Hello ! I'm using queue to do a non stop animation (a blink animation), but when I try to stop it, I'd like that the animation runs until the stack end and not stop immediatly. My code : <html> <head> <script src="http://code.jquery.com/jquery-latest.min.js"></script> <style> div { position: absolute; top: 0px; left: 0px; width: 200px; height: 200px; border: 2px black solid; background-color: green;
jQuery UI datepicker - not working in IE6?
Hello. I have a problem with jQ UI datepicker in IE6, it's positioned just fine, generate the image fine and shows the calendar perfect. But can't pick the date, nothing happens on click, the date isn't showed in input field nor highlighted on the calendar. Any idea what could cause this behaviour? The code I'm using is: $(document).ready(function(){ $("#depart").datepicker({buttonImage: 'images/calendar.gif', buttonImageOnly: true, constrainInput: true, dateFormat: 'dd/mm/y', duration:
jQuery and Firebug
I have been working on extensions to Firebug and Web Inspector that let developers see into the structure of a their code built on JavaScript frameworks. I've hit a milestone, releasing a preview for ExtJS on Firebug. A longer description is here: http://www.sroussey.com/article/2010/11/11/42724/Illumination I built it with the idea that it would support multiple frameworks, and want to move on to jQuery next, and could use a few pointers: - What is needed when debugging jQuery that is obvious to
filter table columns (not table rows)
hey, I am desperately looking for a jquery script that can filter (and hide) table columns - but so far I just found filters that hide rows. May be an example will make it more clear: In a table like |A|B|C| |D|E|F| a search of E hides "|A|B|C|" and only shows |D|E|F| I am looking for something that would hide the first and the third column and only display |B| |E| Since I am quite new to jquery, I did not succeed in re-writing the scripts that are already there... Thanks, ghost34
Using checkboxes to control other elements
I want to use two checkboxes to control the appearance of two blocks. The click method doesn't work well for this situation. I have tried to use the change method, but don't know how to detect which checkboxes are checked. Can someone give a hand please? $(':checkbox').change(function(){ // .... $(':checkbox:checked').each(function(){ // ???? }); });
[jQuery] Testing for presence of ID
In this piece of code (common to a number of pages) I want to set focus to a second input field if there is one. $(function() { $("#first_field_to_enter")[0].focus(); $("#second_field_to_enter")[0].focus(); }); If the second input field is present, focus is on the second field. If not present, focus goes to the first field. All good, except that an error is generated in FF2 error console when the second field is not present. See http://test.danen.org/secure/register.htm and http://test.danen.org/secure/
Setting focus to form field on div popup
I've got this hidden div that pops up using jQuery when the login menu item is clicked. <div class="entry-wrapper" id="reg-login" style="display:none;"> <div class="t"></div> <div id="loginFormHolder" class="c"> <div class="close"> <a href="index.php" class="spotlight-close"> </a> </div> <!-- close --> <div class="login"> <div> <!-- blank --> <div class="loginwrapper"> <form name="loginform" action ="#" class="new_user_session" id="session_form"
assign a function to multiple objects
is it any shortcut for these lines of code: $("#div1").fadeToggle("slow", "linear"); $("#div2").fadeToggle("slow", "linear"); $("#div3").fadeToggle("slow", "linear"); i mean assigning a function for multiple objects, i testes code below, but it didn't worked out: $("#div1").$("#div2").$("#div3").fadeToggle("slow", "linear");
[jQuery] Possible next()/prev() bug?
Hi all, I've come across what is possibly a bug (or unexpected behaviour) when using next(). I have an example page setup here: http://fapdragon.com/test/test.html As far as I can see, the filter for next() is not being applied and it always returns the next DOM element. Can anyone comment on this or should I log a ticket for it? Thanks, Evan -- View this message in context: http://www.nabble.com/Possible-next%28%29-prev%28%29-bug--tf3422183.html#a9538163 Sent from the JQuery mailing list archive
Dynamically creating image map with jQuery problem in IE7
Basically, I've got an <img> in HTML, and I'm using jQuery to dynamically create a <map> element, then append() <area> elements inside it. This works great in all browsers. I can confirm that the elements are being created successfully, however in IE7 the coords are all being set as "0,0,0,0", essentially making the hot spots unclickable. I've debugged using both IE Developer Toolbar and Firebug Lite, and the generated source shows me exactly that - "0,0,0,0". I've also thrown up debug alert()s
Calling $ from inside an iframe
Hi, i guess this isn't really jQuery specific rather than it is a global JS-thing, but I tried general solutions for this and they all did not work so I figured this might be because I'm trying to do this with the $ function. What I wanna do is this: I have a document with an iFrame. From inside that iFrame I wanna call the $-function of the original (parent) document. I tried so many things like parent.$ top.$ window.parent / top.$ the stuff above with .document.$ and other stuff but none of that
Find element with same class name (match class name)
This is probably a dumb question (noob) but I cannot seem to find the answer, either here or on StackOverflow or even Googling... All I want to do is, when clicking on an element, find any other elements with the same class name (and show/hide or do something with them). This is as far as I got: $('option').click(function() { // get the class name of the option element var className = $(this).attr("class"); // find the div with that same class name and show it $('div').hasClass(className).show();
Class Inheritance with jQuery Extend
I've been using $.extend() for quick and simple class inheritance in some of my code. I'm starting a large project now and since this method has been simple and flexible for me so far I'd like to continue using it, but I wanted to run it by a smattering of other devs first to get opinions and find any potential issues. I'm pretty sure this method has some loose ends and pitfalls, but its flexibility and ease of use has come from it being "loose". Here is how it works: var Monster = function(o) {
ajax jquery loading problem.
good day. I am trying to post a form with jquery and ajax to the asp page and return a value back. but on internet explorer before the picture loaded the loading text dissapeared. A sample of my page is downstairs. I dont want that. How can i do what i wanted? html page's address http://www.bybilisim.com/deneme.html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script
How Selectable Plugin prevents Click event
Hi, I've recently started working with jQuery. Using v1.3.1 and UI v1.6RC6. I created an accordion with another accordion nested within it. I've set both to selectable. Things seemed to be working fine until I noticed that IE and FF were behaving differently. IE allowed me to open the accordion tab that contained the nested accordion, and then allowed me to open up the nested accordion. In FF, I could not open the nested accordion. I managed to get it working in FF by setting the cancel property
ajax load multiple pieces of html
So I know that with .load I can load a specific chunk of html. What if I want to load 2 chunks of html in one request? For instance my current page has #nav and #content. My loaded page has the same and I want to replace these 2 elements with the new one (or it contents). $('#nav').load(loadUrl + " #nav"); $('#content').load(loadUrl + " #content"); So the above doesn't work for me for 2 reasons: 1. I load twice. I don't want to do that (but I also don't want to load the js and all because it will
:contains selector to NOT search in children
Hi guys, just wondering if there is any way for the :contains to not look in children to find something? Tried $(':contains("$")');, but it returns everything. Was thinking of something like $(":not(':parent')").filter( ':contains("$")');, but the console returns null (and even then it would exclude elements that have children and their text includes "$".) Trying to make a script that looks through a page and finds the price on any page. The only way I could think of doing this relatively accurately
$.ajax, IE7, cross-domain and POST
I got this working in FireFox if I changed headers to Access-Control-Allow-Origin: *With IE7 I'm getting "Access is denied" error. And with IE7 I can't use XDomainRequest. Is there some workaround besides creating proxy? Like using another request method(PUT?)? Thanks for help
Getting input values with arrayed names
Hey guys, i'm using the slider ui and some hidden input fields to store percentage values in it. I'm having no issue with the plugin itself but with the way jquery gets it's html elements, that's why i'm posting here. On change the sliders change the value of that hidden field so i can submit the form to get the data into the database. My problem is that i have multiple sliders on one site and because of that multiple hidden input fields. All have their own name like "percent[17]" or so. I'm using
[jQuery] How to use If statement with jquery hover event???
Hi I am trying to use a if not statement but trying to use the condition of jquery hover. I have an image and when you put your mouse over it another image appears this image that appears using css would be a menu look however I notice that when I move my mouse off the image to the menu image that appears when your mouse is over the persons image it would then fade away. Ok I will make this as simple as possible: clients image when mouse is over the image another image appears the new image that
Waiting for images loaded to be run [SOLVED]
Hello there, I embedded a s3slider jquery plugin which has a sequence of more than 80 pictures. That causes a problem when loading the page, since when the slider starts the page completion get stuck. To overcome this I thought I could make it run after $(window).load and somehow it starts running after the page content is fully loaded but ... it has to wait for the whole set of 80 pictures which is not very practical. I made this kind of solution: first it has to fully load the page content and
$.post does not work? why?
Why this line never work? $.post("external mail.php file", $("#commentForm").serialize()); Thanks Here is my form, <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js' type='text/javascript'/> <script src='http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js' type='text/javascript'/> <script type='text/javascript'> /*<![CDATA[*/ $(document).ready ( function() { $("#commentForm").validate ({ submitHandler: function() { $.post("external mail.php file", $("#commentForm").serialize());
Next Page