Ajax link problem
$(document).ready(function() { $('#main-content a').live('click', function() { alert(this); $('#main-content').load(this); return false; }); }); Why is the above code segment not loading the page? When i replace this by an url it works correctly. The alert gives a correct url.
Date range
Hi all, I have a start date and end date text boxs. What I would like to achieve is when a submit button is clicked all the available dates between start and end dates should be displayed together with 3 check boxes next to each date (please see below). I am just wondering whether that's achievable with jquery, and if so, how I might be able to implement this. Start date End date 01/01/2010 07/01/2010 Date Morning Afternoon Evening 02/01/2010 03/01/2010 04/01/2010 05/01/2010
What new in 1.4.1
What new in 1.4.1
.css problem
I'm trying to use .css to set a "text-align" property on a div. What I end up with is a div with style="". None of the following work: $('#testdiv').css({textAlign: 'centered'}); $('#testdiv').css("text-align", "centered"); $('#testdiv').attr("style", "text-align:centered;"); If I don't make these calls, firebug shows no "style" attribute. If I do make them, I get a "" style attribute. What does work is creating a "centered" css class and doing this:
.ajax timeout not working
Hello, I had a situation where a server was offline and I took advantage of that to test the ajax timeout and it didn't work. I have a page that does an ajax request against another server which was down at the time. The page basically froze indefinitely. The server has since been returned to operation. Now I simulate an outage by putting a fake hosts file entry and sending the request to an unassigned IP. I have tried numerous methods I've found online and the closest I can find is to use
changing disabled or readonly on document.createElement inputs.
hi! So I have a jquery program that I'm coding to pull all of our assets from a sql db and put them in a table. The table actually exists in a div that will be displayed in a jquery UI dialog. the TRs, TDs and INPUT text fields (where asset data is displayed) is all created dynamically with document.createElement("td") or document.createElement("input"). Here is an example var manufacturerElement = document.createElement("input"); manufacturerElement.id
offset() problem
Hi, I'm new here! I'm having problems with the offset(coords) method. here's the code $(this).hover(function() { var liHover = $(this); longName.text(liHover.find("span.hide").text()); var coords = liHover.offset(); longName.offset({top: coords.top - 4, left: coords.left - 8}); longName.show(); …This is a part of a function of a object that, if a list entry is too long, it shortens it and displays a custom tooltip with the whole name if you make an hover on it it. To display
passing global variables to jquery function
hi, i have this problem in passing values to a variable in a jquery function. i have a js variable that accepts a certain value and then i want to pass this variable in the jquery function. For example, this is my script: var autoScrollBool = "true" var autoScroolInt = "10" (seconds) stepcarousel.setup({ galleryid: 'mygallery', beltclass: 'belt', panelclass: 'panel', autostep: {enable:true, moveby:1, pause:3000}, panelbehavior: {speed:500, wraparound:false, persist:true},
javascript array from input fields
what is the best/easiest/fastest way to get an array of the values from a few input fields? <input type="text" name="a" value="x" /> <input type="text" name="a" value="y" /> <input type="text" name="a" value="z" /> to [ 'x', 'y', 'z' ]
Child menu content not showing in IE7/8
We have setup a Joomla (v1.5.15) site and utilise JQuery v1.3.2 However, the content within child menus "residential, retail, retirement" do not show up in ie7/8. See http://www.arkee.com.au/index.php Does anyone know how to rectify this Phil
Howto: get a hold of jQuery 1.4.1-vsdoc for Visual Studio
Step by step: http://www.morningz.com/2010/how-to-get-jquery-1-4-1-vsdoc/ If you're in a bind and can't get through those steps, feel free to email me (my username @ my username .com) and I'll shoot you a copy of jquery-1.4.1-vsdoc.js - Stephen ** Edit: aw heck, I can just attach the file in ".txt" form right to this post, nice ** ** Edit, take 2: guess it's up on Microsoft's CDN now: http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.1-vsdoc.js ** ============================================ "If
Wrapping words separately inside <p>
Hi there, I have a (not too long) paragraph. In this paragraph a few words are wrapped with <span class="emphasize_m"> and <span class="emphasize_xl"> What i want to do is wrap all words in <span> which aren't wrapped already. Then i want to switch all span opacities to 0 (zero). I don't have an idea of how to wrap words separately... Any help would be greattly appreciated!! Thanks in advance, Knal
How to validate web form before submitting?
I have a asp.net web form that I need to validate before submitting. I've tried the AJAX Control Toolkit but I was having problem with multiple ValidationSummary control conflict. So, my next option I can think of is to use jQuery. First of, how do I test to see if a textbox is blank or not? If blank, output a message to a asp.net Label control on the page and stop the web form submission. Second, if the validation succeeds, proceeds to submitting the web form. Any help is appreciated.
How can I reach this element ?
Hello, I have a table, like this : <table class="tablesorter pager" id="rapport_etudes" style="width:1960px;"> <tr> <td> <select name="rapport_etudes[1][internationale]" iclass="rapport_etude_internationale"> <option value="0">Non</option> <option value="1">Oui</option> </select> <div class="rapport_etude_internationale_details"> <select name="rapport_etudes[1][internationale_details_nationalite]" id="rapport_etude_internationale_details_nationalite"> <option value="0">Client français</option>
Only Firefox works.
Hi! So I've developed 90% of a pretty large site with jquery/ui, and never tested it in anything but Firefox. I know, stupid move, but this is my first site since 1998... It seems like IE 7 & 8, and Safari just don't render jquery at all. <link rel="stylesheet" href="scripts/css/redmond/jquery-ui-1.7.2.custom.css" type="text/css"> <script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script> <script type="text/javascript" src="scripts/jquery-ui-1.7.2.custom.min.js"></script> <script
document.ready error in IE 7
Hi, I am trying to use the Multi Drop Down Menu plugin available at CodeNothing.com. However the problem is occuring even without calling the functions in the plugin. (It occurs when I call the functions in the plugin as well but that doesn't matter) I am experiencing some very strange behaviour. I have some standard nested unordered lists where the top list is given the id multi-ddm. Now when I run the code below I get 1 alert (which is correct as I only have 1 child li element) saying hello.
jQuery .data() or HTML5 data-XXX
Hello! I'd like to get some opinions on what would be the "best" way of storing data on DOM elements. My current example is for tracking clicks on links on my site. I want to mark up my links as pointing either internally/externally, and also noting the parent element so that I know where exactly on the site the link was clicked. I'd then write it all into some analytics. Using HTML5 I could write: <a href="http://jquery.com" data-location="outbound" data-linktype="myfavs">jQuery</a> Using jQuery.data()
Changing background and link color at the same time
Hey all. I have a container <div> with a link inside of it. What I need to do is change the background of the <div> and the color of the link text at the same time. I can change the color of the link when I hover over it, but not when I hover over the <div> I have columns of links and each column is the width of the longest link so there are some links with "space" to the right of the link. When that "space" is hovered over the background of the div changes but not the color of the link text. Here
click / mousedown event is not triggered
hi, I cannot trigger events... The following lines do not work... $('#dhtml_menu-1113').mousedown(); $('#dhtml_menu-1113').click(); This the element I'm disparately trying to click: <a id="dhtml_menu-1113" title="Places" href="/george/content/places">PLACES</a> thanks
Problem with selector context
I'm currently implementing a simple chat for my website and have a problem. I want to update the chat messages and the currently active users with ajax. I know how to do it with 2 ajax calls but I want to do it in one. I have a file which returns the entries and users like this: <div id="entries">These are the entries</div> <div id="users">These are the users</div> My jQuery ajax request looks like this: $.ajax({ type: "GET", url: "chat.php", success: function(retHtml) { var entriesHtml
Why would .load() produce http OPTION requests rather than http GET requests on FF/Chrome?
I have the following code: '#pageDirect': function() { $('#pageDirect').html('<img src="images/8-0.gif" />').show(); $('#pageDirect').load('http://server/page/info.aspx?id=' + folderID + '&xID=' + xID + '&mode=direct'); } In IE it seems to produce valid requests but on FF/Chrome it creates http OPTION requests that results in 401 errors.Any theories on why it's not doing GETs as expected?
How do I select this element?
I am trying to select all radio buttons in a document that are not disabled (I thought this had to be: "has attr type=radio and at the same does not have attr disabled=disabled", but I have lost all faith in that). I am sure this is a very simple thing, and I usually dont waste ppl time by asking stupid questions, but I have no idea how do do it. I have experimented for a whole day and is frustrated and tired.
Selector trouble
Hopefully this is an easy one, but I'm having trouble getting a selector working. Probably best just to give you some example code: HTML <input type='button' class='test' value='Button Name'> <div> <a href='' class='buttonLink' />Click me</a> </div>Jquery $(.buttonLink).click(function() { $(this).closest(':button.test').addClass('testclass'); }); Form that code I would expect the class of 'testclass' to be applied to the button after the link is clicked, but It doesn't seem to work. This is a
Passing tags to dialog
Hi all, I have an odd situation here that I can't figure out. I am opening dialog via image <img src="/Images/Icons/24.png" align="absmiddle" width="12" border="0" title="Edit News" name="News.cfm?ID=2#" vsize="450" hsize="700" sButton="Save" cButton="Cancel">Everything works fine cept the "hsize" tag that controls the width of the dialog. I tried different tags even use "vsize" tag that works fine for height but dialog width stays at default. Anyone has any ideas? Btw if I set height to a value
Loading a HTML Fragment?
Hello, could someone help me out here. I have a login button which takes the user to the login page. Now... this to me seems like a slow way of logging in. I would like users who have javascript enabled to click the login button. Instead of them being forwarded to the login page, I want the login form to magically pop up on top of the web page. I can do this, I can creative a div, add the html and probably with a bit of trying - get the user to login. However I have a question. For maintainability,
jQuery and XML for refresh a web page
Hi I want ask if is possible , with jQuery and CakePhP, reflesh some content different in a web page with a XML!! There is some tutorial for this?? Thank you Bye
Versioning of jquery files
I like how the jquery file have versions in the name, so I can stick them in a common directory and multiple versions can sit side by side, but why don't the validation, ui and other files have version numbers as well? Obviously I can rename them myself, but I think there's an advantage to having this done by default.
How to use the jQuery.noConflict()
Hi, I've a java script error on a page of my web site : http://www.ec2-ms.fr/fr/presentation/partenairesetclients.html It appears to use the library jquery, that may conflict with mootools, the standard joomla library. Both use the "$" in the code to access code on the site. So depending on what library is loaded, and in what order, it may conflict. That why I wanted to use the jQuery.noConflict(). But I don't know how ! What modifications do I have to do ? And where ? Thank you for your
jquery & ajax
I'm using jquery 1.3.2. I've already used ajax request without problems. In my last project, when the javascript do the ajax request, instead of get or post, the web server receive an OPTIONS request, and the server script fails to read params. This is my request: $.ajax({ url: _xml_server, data: { POSTDATA: xml } }); What's wrong? Thanks!
getScript() - Any way to stop same script loading / executing more than once?
Is it possible to tell if a script has already been loaded/executed? I've using the jQuery UI tabs and they dynamically load the correct .js file for each tab's contents. However if a user switches back and forth between tabs it seems the relevant .js files are loaded over and over again and things soon start to get very slow. I thought about using a variable and flagging it as true is a script has run, but I was hoping for a more elegant method as I could end with a lot of scripts. Thanks Ric
.get and content not inheriting its parent div.
I'm using jquerys $.get function to insert external php files into my current page with the .html function. The problem is the div tags inside the php file aren't inheriting the width of the div im inserting them into and using the page width instead. Is there a way to force them to inherit their 'new' parents width without using .width() to give them a fixed width? jquery code: $.get(url, function(data) { $('#col3_tabs').html(data); });#col3_tabs is set to a % width.
scrollTo / localScroll in 1.4
Hi guys, I was wondering if there are any other people out there who's scrollTo / localScroll have stopped working after using jQuery 1.4? Kind regards, Knal
jQuery 1.4.1, Opera 10.10 and Frames
I use frames in my scripts. I use jQuery 1.4.1. It works well in Firefox, Google Chrome and IE, but it didn't work in Opera. Opera didn't display the file in the frame. When I use jQuery 1.2.3, I haven't problems. Is this a bug or error in my scripts? Sorry for my poor English. My script are: index.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <title>Title</title> <meta http-equiv="Content-Type" content="text/html;
Reloading main video after clicking on thumbnail images—AJAX? innerhtml? Something else?
Hey folks, I've hit a little bit of a road block developing this site: http://ofcoursegolf.com/preview I'm attempting to use the thumbnails to load a new video in the main object. I've used this: $(document).ready(function(){ $('.thumbnail').bind('click', function() { new_video = $(this).attr('href'); $('.main_video').attr('src', new_video); $('.main_video').siblings('param').attr('value', new_video); return false; }); });to replace the attributes in the object, but at this point, the source
Loading function after RSS loads.
I'm currently working on a site where we pull in information from an RSS feed and then use a script to rotate them. The problem that I'm coming up against is if the RSS takes a while to load the script is throwing an error. The RSS feed is being pumped out as list items so if the li isn't found that's when I receive the error. I thought a while loop maybe the answer to this but I'm unsure about how to implement it. I've attached the function below. If anyone could help that would be great. $(window).bind('load',
Highlight parent as long as any input is checked
Hello everyone... I've got quite a challenging problem (for me) with jQuery and highlighting a parent <li> from activating checkboxes. I've got a nested unordered list which contains checkboxes... Example HTML: <ul> <li class="main_first"><span>Main Item 1</span> <ul> <li><input class="sub_first" type="checkbox"><label>Sub Item 1</label></li> <li><input class="sub_second" type="checkbox"><label>Sub Item 2</label></li>
jQuery .load event refreshes Flash mp3 player in IE only
Hey all, On my site http://www.section30band.com, if you click one of the navigation links (all links perform a .load() when clicked), something is forcing the mp3 player to be refreshed. This "piles" up the songs and obviously sounds like garbage... This ONLY happens in IE! Firefox, Safari and Chrome all behave as expected. The click event has a "return false". Through commenting out other statements, I have come to the conclusion that it is the .load() call. I've been fighting this for
urgent help needed. having trouble with IE..
I am trying to create a flyout menu which works with hovering. The user hovers over an <li> item which reveals a div which is positioned directly underneath the li. This is my code for the showing and revealing of the div. $("#portaltab-games").hover(function() { $("#games-flyout").slideDown('fast').show(); $(this).parent().hover(function() { }, function(){ $("#games-flyout").slideUp('fast');
Retrieving text inside a <b> tag
Hi, I´d really appreciate if you could explain how I´d be able to retrieve the text "Text I want to retrieve". The structure is exactly as presented. This is what I managed to come up with so far: jQuery(".colhead").parent().parent().children()[1].cells[1].childNodes[1] This brings me the <b> tag where the text is, but none of the functions or attributes seems to contain the text. <table width="95%" cellspacing="0" cellpadding="5" border="1"> <tbody> <tr> <td class="colhead">col1</td>
Check Function. Could someone please help me out? Urgent. Thank You.
Hello, I am applying a function (tinymce) to some text areas. However I need to check before if this function exists (if its js file was loaded). If I would use JS I would do this: $(document).ready(function() { if (typeof (tinymce) !== "undefined") { $('textarea.Editor-Base').tinymce({ // ... This is not working. Even if the function tinymce is present it is not applied. I removed the code line (if (typeof (tinymce) !== "undefined") {) and not tinymce runs. But I really need to test it. This
Next Page