How to: refresh div on page load, append element to div, change image on click
Hello, I have questions related to three operations using jQuery: refresh a div element on page load append an element on top of the other elements in div change an image (pending/accepted) from the div's elements I know that there are tutorials for that, but i am so short in time. I just finished my PHP courses, and i am too tired to get into the jQuery magic right now. Here is the situation that i am confronting. I have to files: propune.php (which is basically the page that has the form and the
TreeView with Grid/Table data
Hi, I need a TreeView which is inside the first column of a table. In the seconds (and more) columns there should be data about every "row" of the treeview. It is important that the data for each item is aligned under each other. Do you understand what I mean? Has someone seen something like this? Thomas
[jQuery] inArray unintuitive
PHP's in_array was created before jQuery's inArray, so I'm not sure of the origin of the choice of function name jQuery took, but if it was from PHP, they either named the function incorrectly or created the function with a return value that is incorrect. I am leaning toward naming it incorrectly. An English sentence would say, "If an element is in an array, do something, otherwise do something else." That sentence is based on a boolean condition and in no way is asking to "do something" based on
Wrapping specific words inside SPAN elements?
Let's say I have this paragraph... <p>My dog is brown.</p> I would like to accomplish this... <p>My <span class="animal">dog</span> is brown.</p> So, I want to use JavaScript to find all "dog" strings inside the paragraph and wrap them in a SPAN element of a given class.... I would love to have a plug-in that does that... like this: $("p").findAndWrap("dog", "<span class='animal' />"); I know this can be done in JS, but I'm not particularly experienced in JS string manipulation, so it would take
$.Deferred chains
Hi all! I'm excited about jQuery has implemented Deferred! But I can't find very important functionality - deferred chains. Yes, there is $.when(...) method. But it works only once and then you can't add async call to chain. I'm looking for something like this: $.get('/ajax/1/') .done(function(){ console.log('ajax 1 success'); // first ajax scope }) .then(function(){ return $.get('/ajax/2/'); // but if we're returning promise ... }) .done(function(){ console.log('ajax 2 success'); // ... scope changes
loading content before displaying
Hi I'm fairly new to JQuery and am trying to get my menus to load all the images before it tries to fade in. I am passing categoryid to an external php page which gets the relevant data from the database, and then displays it in the right div element. My Code so far: <script> function loadContent(id) { $("#leftmenu").load("query_left.php?category="+id+"").fadeIn("slow"); $("#rightmenu").load("query_right.php?category="+id+"").fadeIn("slow"); } </script> At the moment, this code seems to load the
XML parsing doesn't work in IE 8 - How to parse an element in IE? - Take a look at the sample html file
Hello forum, after a lot of investigations I don't know the answer why the attached sample doesn't work properly. Please take a look at the attached sample. That's a html file. Because of forbidden uploads of html files i removed the file extension. So please put after download the file extension ".html" on it and take a look at the sourcecode. The goal is to parse the included xml structure and to show the some information as checkboxes with a title or description. The checkboxes are parsed based
Validation issue
Hi Folks, I am new to JQuery and have used it for an application form. Unfortunately, the validation is not working as it should. I'm not sure exactly where I might be going wrong. The form still "submits" even though the validation has picked up on blank fields. I have pasted the coded below: **** START OF CODE **** <script type="text/javascript"> $(function(){ // Grab each form element $("label[title]").each(function(){ $(this).append("<div class=\"infopop\">"); titletext = $(this).attr("title");
Using jQuery to parse XML
First post. Looking to parse the XML file a perl script sends back. I want to get values from specific tags in the XML file. Here is my code: $.ajax({ type: "GET", url: 'http://servername/cgi-bin/findwhoisonduty.pl?host='+groupName, dataType: "xml", success: function parseXml(xml){ $xml.find('ax21:user').each(function(){ var firstName = $(this).find('ax21:firstName').text(); var lastName = $(this).find('ax21:lastName').text(); }); alert(firstName
Selecting by a custom DOM property
Hello everybody, i have a script, that adds a custom DOM property to <li> elements (.qqFileId=2 f.i.). Is it possible to select the list item with jQuery by the value of this property? $(...) thx for any advice, haemse
[jQuery] hi guys do you know any good jquery plugin for photo tagging ?
hi guys do you know any good jquery plugin for photo tagging ? <br clear="all"> -- Putra Prima A 0410630078 Teknik Elektro Brawijaya 3 ipa 2 smunsa 2004 <a href="http://siubie.zxq.net/wordpress/">http://siubie.zxq.net/wordpress/</a>
Expandable lists problem
I am developing an expandable list in a website. I got it working to where the nested lists expand using slideToggle and if I click on another list item, any expanded lists collapse and the clicked list expands but I cant figure out one last thing... when a list is already expanded, and the person wants to collapse it, I want them to be able to click on the parent list item to collapse the open list. It currently does collapse it but then opens it immediately after. I need to be able to put some
[jQuery] mouseover/out events
Hi, I have really stuck with this one. :) I have divs that contain html text. What I need is when I move mouse over that div link is displayed to edit content. I have such code: $J('div.editable_content').mouseover(function(event) { $J(event.target).css("border", "1px solid black"); $J('div.content_edit', event.target).show(); return true; }).mouseout(function(event) { $J(event.target).css("border", "0px"); setTimeout(function(){ $J('div.content_edit', event.target).hide();
Upgrade guide
Hi. Is there a guide or some documentation about the process of upgrading to a newer version of JQuery? In my case, I'm still using the 1.3.2. Thanks
Content fadeOut .. Browser backward button
Hi guys, When clicking the menu links on my site I want the page main content to fade out just right before the linked page is loaded, this way.. $(document).ready(function () { $('#topmenu a').click(function() { $('div#main').fadeOut(); }); }); But when I click the browser backward button and it goes back to the page I was, its content remains faded out, which is kind of awkward.. I just want the page content fading in again if the browser backward button is clicked. Is there a way
Internet Explorer, jQuery 1.5.2 and Invalid Argument at line 7968
Hi guys, I'm having this problem recently and I need a solution for it. Internet Explorer shows up the error "Invalid Argument", and point the line 7968, char 5 (jQuery uncompressed). Error details: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; Tablet PC 2.0; .NET4.0E) Timestamp: Tue, 5 Apr 2011 19:05:31 UTC Message: Invalid argument. Line:
If date is expired addClass
How can I add an class to my <TR> when the date is expired? <table id="wp-table-reloaded-id-34-no-1" class="wp-table-reloaded wp-table-reloaded-id-34"> <thead> <tr class="row-1 odd"> <th class="column-1"> Date </th> <th class="column-2"> Event </th> <th class="column-3"> What? </th> </tr> </thead> <tbody> <tr class="row-2 even"> <td class="column-1"> 25-02-2011
Extrac string from a given expression
Hi, Is there an available function in jQuery that would let me extract certain string of characters in a given expression, say I have the expression "2|23|6|niece", i wanted to extract 2,23,6 and niece from the given expresion and assign each in a variable leaving the (" | ") character, Regex and For Loop?
help with toggle
i am tryingo to do a list and do toggle on it it works wrell but even when i click on li makes the toggle is that a way to make works only on the ul??? thanks fot the help and sorry for the english. $(function(){ $('.a').hide(); $('.b').click(function(){ $(this).find('.b').next().toggle(); }); }); <ul class='b'>123 <li class='a'>a</li> <li class='a'>b</li> <li class='a'>c</li> </ul>
Show image after drop
Hi, I'm newbie on jQuery and I hope to help me. I've an image, and after a drop to another position, I would like to show this image. How do I proceed? Thanks for your help.
on focus add delete button
when an input with class="text" is focused i add a delete button to the parent element. But if there are more than 1 inputs with this class it adds several buttons on some of the parent elements. how do i prevent this? $j('.text').focus(function(){ var parts = $j(this).attr('id').split('-'); $j(this.parentNode).append('<input type="button" class="delete" value="del" id="delete-'+parts[1]+'" />'); }); $j('.text').blur(function(){
[jQuery] select all checkboxes
hi, what's the best way to select/deselect checkboxes in a form with jquery? can anyone provide a sample code, please? thanks in advance. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Problem with 64 bits operating system
I'm using jquery but i have a problem when i want to use JQuery in 64-bit operating system. Can anybody to help me? Thanks Laura
Script Stack Space Exhausted on Firefox
Hello, I have a JSP page that I am updating via an AJAX post. When the page gets sufficiently large, I get a "script stack space quota is exhausted" message. I realize it is due to the size of the response, but is there a better way than the following? jQuery.fn.success = function(responseText, statusText, $form) { var formId = '#' + $form.attr('id'); $(formId).replaceWith($(formId, responseText)); // Set up our form object again now that we've replaced our form with the data coming
the "data" parameter is always undefined in the success callback in jQuery > 1.5
I have a really simple scenario which got broken after upgrading to 1.5. the defined handler for the success callback in $.ajax doen't set the data parameter - it's always undefined. This works fine in 1.4.4. Could someone clarify if this is a bug or a breaking API change ? Thanks, Angel
2 Functions working at the same time
Hi, Can anyone help me with this it would be greatly appreciated. How can I get 2 functions working at the same time? Here is what I have at the top: <script type="text/javascript" src="jquery-1.5.2.min.js"></script> <script type="text/javascript" src="jquery.innerfade.js"></script> <script type="text/javascript" src="switch.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#rotate').innerfade({ speed: 'slow', timeout: 10000, type: 'sequence', containerheight:
pulling images from a directory jquery
Hi I've created a jquery slideshow what I wanna do is to pull files from a directory and add them to the slideshow like open file dialog or any other technique. any help or suggestion would be appreciated. Regards -- A.J.
Trying to sent a var (myvar) from a hyperlink to jquery doesnt work in firefox only in IE. .live bug?
Hello all, I'm trying to sent a var to my jquery script when i click on a hyperlink inside the search.php. I had discovered that this will only work when using .live, but it wont work with firefox, chrome. It will only work in IE. Is there a workaround for this? This is the situation: Page 1: index.php -->main page with search input field. Page 2: search.php -->contains search results and the hyperlink with the value i sent to the jquery. This is the hyperlink: echo "<a href=\"#\" id=\"myhyperlink\"
scrolling vertically using images (example given)
hey, I want to achieve a similar effect using jquery and in div's not tables, any ideas? http://www.dynamicdrive.com/dynamicindex11/scrollc2_dev.htm
question about Ajaxsetup()
If I use ajaxSetup to setup an predefined ajax options before every ajax() call. Then when I use ajax, I would change some options, such as timeout, error event, async, on ajax(). Will those changed options will be inherited by further ajax()'s. Thank you very much!
Dynamic form help urgent
i hav some thing like this <td colspan="5" style=" display: none;" id="boxreply'.$row["i_iid"].'" n="'.$row["i_iid"].'"> <a class="inboxreply" n="'.$row["i_iid"].'" carid="'.$row["a_adid"].'" subj="رد:'.$row["i_topic"].'" ton="'.$nic.'" toid="'.$row["m_mid_sen"].'" href="#" > reply to sender <img src="images/Mail.png" border="0" alt="رد"/> </a> </td></tr> <tr><td colspan="5" style=" display: none;" class="replyform" id="replyform'.$row["i_iid"].'" n="'.$row["i_iid"].'">
Problem with Jquery.get
I am trying to use the Jquery ajax get method as follows $.ajax({ url: temp_url, type: 'GET', data: datatemp, error: function() { alert("This is an error"); }, success: function(e) { alert(e); //ProcessRequest(); }, complete: function(e) { alert("This request is complete"); } }); None of the alert statements get executed and the query does not work. The temp_url is a url to the localhost:8080 server. I am a newbie in JQuery. I also used other datatypes like jsonp which also does not get executed.
Transparent AP DIV overlapping Jquery cycle plugin not functioning
Hi, I am trying place an AP DIV which floats above a jquery cycle plugin slideshow. It uses transparency so you can see the images through the Div box percentage colour. At the moment the AP DIV can only sit behind the jquery slideshow. Can it sit above the slideshow? Here is the link: http://www.hoof.net.au/cycle_home.html cheers, Alex
offset() returning invalid coordinates when inside relative div
I'm working on a link within a relative div in a very complex web app. when using offset it is giving me the position relative to the div, not the document window. Any ideas?
Issues since updating to jquery 1.5
Ever since updating from 1.4 to 1.5, I've been getting the following error. uncaught exception: Syntax error, unrecognized expression: [href=/topics/ps3]This is the code that's throwing the error. reloadLink = $("#Nav a[href=" + topic_path + "]");From reading on the changes of 1.5, it now sounds like the attribute values has to be wrapped in quotes, however, my attribue value is derived from the following. topic_path = '/topics/' + window.location.hash.replace(/^#/, '');So wrapping topic_path with
Calling jquery after Ajax load
I'm using AJAX to pull in a page into another page. The page I am pulling looks like so: <script type="text/javascript"> $('#conditionslink').click(function () { var content = $(this).parent().parent().parent(); content.find('#progConditions').toggle(); var runnersheight = content.height() - content.find('#programHeaders').height(); content.find('#runnersBox').height(runnersheight - 8); }); </script> <div id="programHeaders" style="padding: 4px; text-align:
Need some help with my Jquery
Hello, I am trying to make a menu and I almost finished it, but i ran into a problem. When I click a menu item, the submenu is showing it self perfectly, and when I hover over it it stays, hover out and it goes back up. Up to that point everything works as a charm. Now my problem is, when you click one of the menu options, the submenu shows: But when you just go UP with your mouse (instead of going over the submenu) it's staying. The website i'm talking about is here: http://dev.teamtgooi.com/ And
passing a variable within a document.ready function into inline modal window
hi i'm using a jQuery Inline Modal Window. the code for it can be found here http://www.sohtanaka.com/web-design/inline-modal-window-w-css-and-jquery/ i currently have an array within a function in javascript. when i click on the appropriate link for the inline modal, the inline modal window appears. my function looks something like this [CODE] function match_all_groups(){ var pop_up_status; var match_groups = new Array(); var match_groups_count = 0; $(document).ready(function(){
working in firefox but not in chrome
the following line of code is NOT working in chrome/safari as it is supposed 2 its working perfectly in firefox and Opera however: $('#box8').delay(1100).animate({"left": "+=300px"}, 5000); in firefox/opera the div box slides from its place to the right 300px but in chrome/safari it suddenly jumps to the right and then slides to the left 300px leaving it half through the page!
using window.onload instead of document.ready
Ive been advised to use "window.onload" instead of "document.ready" and im having problems implementing it, im sure its a syntax error. here is my original code var chart; $(document).ready(function() { and i want to change it to onload, and im trying to get this to work var chart; $(window).onload(function() { what is the proper syntax for using window.onload with jquery?
Next Page