[jQuery] How to manipulate an object containaing HTML
Hello, i'm trying to find out how to edit (manipulate DOM) of an HTML ajax result. What i have is the following : $('a').live('click',function(e){ var link = this; $.ajax({ url: "testAjax.html", cache: false, data: 'href='+this.href, success: function(html){ html.appendTo("#myTable"); } }); e.preventDefault(); }) Which returns rows of a table : <tr> <td></td> <td></td> </tr> <tr> <td></td> <td></td> </tr> What i would like to do is before appending to the table something like that : $(html).$("td").css('padding-left','80px');
What is this, and is it important?
I see this in the beginning of some jquery scripts: $(function() { // some stuff }); I need a simple (dumbed-down) explanation of what it does. And yes, I've looked around for answers, but I'm falling on my face with this. I do know it makes things work! thanks!
So easy.... For You!
Longtime visitor - first time poster - and i'm looking for some quick assistance. I have this here: //Sound button var button =$('<div class="fleft soundBtn"><input type="img" class="soundButtonOff" /></div>').appendTo(cp); button.mouseover( function() { $(this).removeClass('soundButtonOff'); $(this).addClass('soundButtonOn'); }); button.mouseout( function() { $(this).removeClass('soundButtonOn'); $(this).addClass('soundButtonOff'); }); //Put your onclick function here button.click( function() {
[jQuery] (autocomplete) show selection list programatically
Hi, I'm using the autocomplete plugin: http://docs.jquery.com/Plugins/Autocomplete I'd like to trigger the display of the selection list from javascript, for example when an empty textarea get's focus, when a button on the page is clicked, etc.. Is there a way to call an internal function to trigger the display of the list? I've been at this for a little while now, with no sucess. Thanks in advance!
Jquery and SWF
Greeting, I have been searching for a answer to a problem I have run across with a small project. This looked like a helpful community, so I hope someone is able to give me some guidance. I will try to explain it as best as I can, and include most of the code on the page. The site goes to a county-list case in a switch. On the county list I have a swf that includes a id for all the counties (see flash code below). I also call all the counties with php as a list also. When clicked I would like the
Want to get external meta tags, .load not working in Firefox
Hello, and thank you kindly for helping a novice with his first script. I want to get the META DESCRIPTION from an external page that doesn't have an RSS version (yet, anyway, I might be able to talk them into it) and add a link to the full article. Here's the full pseudo-code: $(document).ready(function(){ $(".ext_descr dd").hide(); $(".ext_descr a").click(function(event){ var link = this.href; $(".ext_descr dd").attr("id",""); $(this).closest("dt").next().attr("id", "xd_current");
[jQuery] Form validation
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=us-ascii" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 8.00.6001.18813"></HEAD> <BODY> <DIV><FONT size=2 face="Trebuchet MS"><SPAN class=777593502-02102009>I cant get the validation in my form to work. Using malsup to sumbit and trying to add validate.js plugin but it wont work.</SPAN></FONT></DIV> <DIV><FONT size=2 face="Trebuchet MS"><SPAN class=777593502-02102009></SPAN></FONT> </DIV>
[jQuery] (autocomplete) multiple inputbox using same autocomplete function
code at the bottom is working fine .. wherein data is coming from database via postcode.php in following format : 2221|BLAKEHURST|NSW 4401|ACKLAND|QLD 2221|BLAKEHURST|NSW 4401|ACKLAND|QLD 2221|BLAKEHURST|NSW 4401|ACKLAND|QLD Now issue is I have multiple postalcode, city and state input box in my code in same page like : <input type="text" id="postalcode" /> <input type="text" id="city" /> <input type="text" id="state" /> <input type="text" id="postalcodex" /> <input type="text" id="cityx" /> <input
[jQuery] why can't I retrieve style properties from DOM?
HI everyone -- I'm not sure this is the right group to post to, I've just found this group. I notice the old alt.dhtml group has been murdered, overwhelmed by spam. I apologize if this is the wrong group. On my page: http://sellmycalls.com/cgi-bin/chain I am trying to get an element's style.top, style.marginTop, and backgroundColor. I can successfully do getElementById( ) on the element, but I can't get any settings from the element. If you bring up the page, all of this stuff is supposed to display
[jQuery] Modify how name:value pairs are converted in the URL
Whenever execute the following code, the URL that is formed has "?" before my name and an "=" before my value (so the URL would be "http:// url/?acct=123"). I need the URL formatted so that a "+" is in front of the name and a ":" (colon) to be before the value (i.e. formatted like "http://url/+acct:123"). Is there a way to change this behavior? $.ajax({ url: lansaUrl('proc', 'func'), global: true, cache: false, type: "GET", data: ({"acct": object.value}), dataType:
[jQuery] Combining old Tabs design with new Progress Bar
I love and use the old jQuery Tabs on jquery 1.2.3: [url]http://psylicyde.com/misc/tabs-test/[/url] I want to integrate the new Progress Bar UI feature on jQuery 1.3.2 and jQuery UI 1.7.2 : [url]http://psylicyde.com/misc/progress-bar/[/url] When I combine then however, the new tab style of jQuery 1.3.2 takes over as seen here: [url]http://psylicyde.com/misc/tabs-progressbar/[/url] How can I insert the new Progress Bar into the old Tabs, without the tabs reverting to the new design?
[jQuery] trouble calling a function
Hello I am trying to set up a toggle to allow users to show more precision when a user clicks a button. I have a function high() that doesn't do anything when it is called. I am fairly new to jQuery so I am not to familiar with the syntax and am hoping that you can help me. var numeric_data = new Array(); $('.numeric', this).each(function() { data = parseFloat($(this).text()); numeric_data.push(data) }); i = 0; this works $('.numeric', this).each(function() { data = numeric_data[i]; data
[jQuery] How to submit validated form?
I am unable to submit the form after validation. I have tried various ways to submit but my form action is not honored. Thanks for any help http://codepad.org/yAqp0Nln
Problem passing variables into JQ
This probably seems pretty trivial to you experts but I just don't know why it doesn't work and would like a nudge in the right direction please. I have a sllide and fade that works great - no problems. I am firing it with a function call from the HTML like so; <a href='#' onClick='sfade('#s1'); return false;> as you see I am passing the div to be faded(and slid) as a variable. Works great. The receiving function is: var str=''; function sfade(str){ $(str).slideFadeToggle(1000); }; You will
Writing custom jquery tween (no animate() function)
Is there a way to write a custom tweening function, preferably with easing, without the use of the build in animate() function? In Javascript, it's possible to do this with an interval, but I haven't been successful in finding something similar for jquery Any fancy a go at this?
[jQuery] Selecting Form Element Labels
I'm using a form in several places for this project. I don't want to duplicates of this form so I have it as an include file. Each page requires all the same fields, however, there is one page where I'd like to remove two fields. <fieldset> <label for="FirstName">First Name</label> <input id="FirstName" /> </fieldset> Is there a way to remove an input field and it's label by selecting the ID of the input field? I looked at the JQuery doc, and there's a prev + next selector which shows $('label +
JQuery UI Sortable with multiple levels of children
ok so I am new to jquery and am having an issue the format of the doc I have below is as such <div id="header_0"> <div id="input_0123"> <div class="inputclass"> content </div> <div class="outputs"> <div id="output_1234"> <div class="outputclass"> content </div> </div> <div id="output_5678"> <div class="outputclass"> content </div> </div> </div> </div> </div> ...etc ok so I want to sort the individual output divs within each input I can't figure out what to do to get this to work i have tried : $('div[id*="input_"]').each(function(g){
[jQuery] Form Validation errorplacement
please read.... http://codepad.org/MBcrgq7U
[jQuery] click function populating value in a hidden field
Hi. I have a table set up with a .click() function on each row so that if it is clicked on, a class is added to the row thus changing the background, etc. I was wondering if there was is a way to take the id of the row that was clicked and populate a hidden field with it. What would I need to include in my .click() function for this to work? Here is my current one: $("tr").click(function () { $(".clicked").removeClass("clicked"); $(this).addClass("clicked"); });
[jQuery] ajax complete function not being called
I'm making a call to a Twitter JSON feed, and when I pass an incorrect username, jQuery's ajax complete method never gets called. An example of a JSON response that causes complete not to be called (nor error, nor success) is: http://twitter.com/users/show.json?screen_name=bhdjbhubeuhfbfbjfbjf Here's my code: $.ajax({ type: "GET", url: "http://twitter.com/users/show.json", cache: false, data: "screen_name=" + $('#account-id').val().replace(/^\s*|\s*$/ g,''), dataType: "jsonp",
Notre Dame Inspired Jquery -- Exists?
http://www.nd.edu/ Their homepage has a carousel-ish type of feature. Does anyone know if this exists already with a jQuery plugin? I don't know if our project has the allotted time for me to make one from scratch, so I was curious if it existed or could be easily adapted from somewhere else. If anyone has any insight, it would be very helpful. It doesn't need video or anything inside, just the three rotating images on click, coming in front of one another.
[jQuery] Downloading Jquery
Im creating a photo gallery that uses jquery. After downloading jquery it wont let me run it. Anybody know whats up with that.
[jQuery] Is it possible to use jQuery BlockUI inside a User Control in .NET ?
Hello buddys I am a ASP.NET developer and I would like to use the jQuery BlockUI inside a generic control, designed to show a popup (with javascript and CSS effects). My problem is to disable (key tab, enter and mouse clicks) the parent window (parent element) (my control is inside the page and does not use iframe). Inside my control I have a DIV and I show his content when the user call the method designed. The problem is: I only see the "caller" of BlockUI using this type of eventhandler "CLICK",
[jQuery] change backgroundposition to window width
$(function(){ var w = $(window).width(); $('#background').css({backgroundPosition: w + 'px 190px'}); }); Could anyone explain to mee why this is not working...?
Jquery Ajax stops scripts working
Hello guys, Im using Jquery ajax in a page and the jquery in the page imported doesnt work, all the style is fine, but neither the script in the html called nor the script referenced by a link works. But If I paste that same code in the html, just where it was suposed to be, it works just fine. So as I said the page that's being called has 2 scripts, one in the page and a .js, the links are ok, if I delete any of them the other one doesnt work, so i believe its something with the ajax function of
Event callback from shared resource
I have an html page that has a link on it. When that link is clicked I open a dialog and use ajax to load some content into that dialog. The content is a search form used to find people in a database. That content comes from a different website on my server. My issue is that once the user has search and found a person they want to select I need to get the information about that selection back to the original calling form. How can i do that? So the workflow is webpage1>click link>dialog opens with
sliding bar
Hi! Have a problem I need to make a sliding menu-bar. I've drowed how it should work..you can see it below. Really cant think because of bears, roaming under my window and half-glass of VODKA i need to drink! I'm from Russia! Please, give me advice how i can do it! Thanks!
[jQuery] compare variables
I have varA = com and varB=com55 or ton2 or son1.9 or whatever values... I want to do a comparison if the prefix of varB = com, which is varA, then do something. How can i write the code for this ?
[jQuery] Selectors .each
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content="text/html; charset=us-ascii" http-equiv=Content-Type> <META name=GENERATOR content="MSHTML 8.00.6001.18813"></HEAD> <BODY> <DIV><FONT size=2 face="Trebuchet MS"><SPAN class=378151415-01102009>I am trying to add a class to the first <dl> item each time it appears inside set_list</SPAN></FONT></DIV> <DIV><FONT size=2 face="Trebuchet MS"><SPAN class=378151415-01102009></SPAN></FONT> </DIV> <DIV><FONT size=2 face="Trebuchet
[jQuery] how to replace all the '[]' to be '' in $.SortSerialize('MDEExportedList').hash
I use $.SortSerialize('MDEExportedList').hash.replace('[]','') but only the first one is replaced. Who can help me?
[jQuery] remove accordion item
hi, i want to realize a delete button or link within an accordion item. is it possible to remove a special item or make the header disabled after a link click within the accordion item content? so far i' ve tried $(this).parent().fadeOut('slow'); but this kills all item contents :O( best regards.
[jQuery] Randomly change thumbs ?
Hi pros. is there a way to manipulate thumbnails on a page.. for example to place 6 thumbs there ( 12 thumbs are in gallery ) and change them randomly ? im seaching for a solution or quite a while but cant find anything. Greetings
[jQuery] Form Validation
Hi, I have got some very rudimentary validation working with JQuery validation, however, by default, it creates some label tags with the error messages in them, right next to the input tags which have errors. How can I control where these error messages are displayed, as they're inside the same div as the input tag which is causing display issues. I'm very new to JQuery so please elaborate a little bit if you can. Thanks! B
Image Swap onClick
I have a bunch of thumbnails and a main image to the right of those thumbnails. What I'm trying to do is have the thumbnail appear (an enlarged version obviosly) as the main image on click. It's not working for some reason. Can anyone help? I'll leave my code. It's not that much. Keep in mind I'm using an animated opacity script - you can ignore that. The script I'm having trouble with is right below that. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[jQuery] parentNode is null or not an object
I am getting this error on IE8; it is working nice on firefox, and I have to support IE. I found this page: http://www.nabble.com/Error-with-BlockUI:-%27parentNode%27-is-null-or-not-an-object-td22990094s27240.html And they identify as the problem occurring here: The error occurs in the 'install' function right here: <quote from link> var node = msg.jquery ? msg[0] : msg; var data = {}; $(el).data('blockUI.history', data); data.el = node; data.parent = node.parentNode; <--- ERROR OCCURS HERE </quote
[jQuery] Can't load a page from a loaded page.
I'm trying to load a page using the .load(url) from an already loaded page, but nothing responds. Below is a simple sample page created to show what I want to accomplish. Also, I'm using JQuery 1.3. ----- index.html ----- <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#mainview").load("page01.html"); $("#clickme").click(function(){ $("#mainview").load("page02.html"); }); $("#clickme2").click(function(){
[jQuery] jQuery is not a function
i am getting this error while i am using a plug in on word press. please tell me if you know any possible solution!! Regards, EjjA
[jQuery] (autocomplete) - avoidRepeated option?
Hi! I wondered if there were any plans to add another option, as stated in the subject "avoidRepeated" which would work when option "multiple" is set to true. The thing is now I can choose a same element multiple times, which makes no sense according to my business logic. I've been trying to imagine where having the same item selected multiple times could be useful, but still can think of a good answer, so I guess this could be of interest to some other people as well. Cheers, Machi
[jQuery] (autocomplete) - possible bug
Hi people, first off thanks for the terrific job done with the autocomplete pluggin. However I think I found a bug: I have an input text box with enabled autocomplete defined as follows: $('#hostsTextBox').autocomplete(jsonHostsArray, { autoFill : true, multiple : true, mustMatch : true }); Lest assume the following jsonHostsArray variable as follows: jsonHostsArray = ['Windows', 'Linux', 'Mac']; So, when I type "w" something, it brings Windows suggestion. Fine. Now I set the cursor to the begging
Show loader while loading large amounts of data
Hi all, I am having a little problem trying to show a loader (An animated GIF) while some request to a database happens. I have a page where the user selects a YEAR and when they select it with AJAX I perform a request to a database to get all the values for that specific year. The problem is that there is a lot of information (4000+ records) that I need to query and show in a table (Actually I didn't use a table I use DIVs that look like a table), and when the user selects the year the webpage freezes
Next Page