jquery

jQuery: $j('body').append(...) doesn't work?

function floatymessage(message){ if (!$j('.floatymessage')){ $j('body').append("<div class='floatymessage'>HERRO</div>"); } $j(".floatymessage").html(message) $j(".fleatymessage").css('display', 'block') } When the following is executed (tested with alert('hi')) i do not see the div at the bottom in webkit's in...

jquery ui - referencing dropped element

So I know that if an element is droppable, then you can set an option like: drop: function(){ alert('something was dropped'); } but how can I set it so I can reference the element dropped onto it, so I could do something like this: drop: function(){ alert(elementId + ' was dropped'); } Thanks. ...

Can I use a variable to pass a json string?

This code works: $(this).load($('.pageloadlabel', this).attr('href'), {category: 1}); This code doesn't work: var data = '{category: 1}'; $(this).load($('.pageloadlabel', this).attr('href'), data); The question is, how can I make it work? Thank you. ...

jQuery: how do I get a div to go away after 1 second? (jQuery 1.3.2)

Is there a way to hide a div after 1 second? EDIT: setTimeout(function(){ $j('.flotymessage').fadeOut(300); },1000); doesn't work =\ .floatymessage is a div ...

How to simulate the clicking of a hyperlink?

Say I have 2 links a1 and a2, and a2 is hidden. When the user clicks on a1, I want to simulate the clicking of a2. How can this be done with jQuery? ...

Searching for an image element whose src contains a keyword, in an iFrame's HTML using jQuery

I am digging deep into a page's DOM to manipulate a certain image attribute. I have a web page which contains an iFrame. The iFrame contains an image. The image has no id attribute so I am going to locate it using it's src. The src contains the unique keyword 'planet'. How do I locate this image using jQuery? ADDITION: I can't referenc...

Iterate through javascript object with generated variable names

Hi, I'm trying to iterate through a bunch of variables in a javascript (using jQuery) object that was returned through JSON, without having to specify each variable name. What I want to do is loop through the following elements of an object and test their values: obj.pract_0 obj.pract_1 obj.pract_2 obj.pract_3 .. .. obj.pract_100 The ...

jQuery: div doesn't appear until second click? I want it on the first. =\

First click: empty floatymessage div. second click and after: works. jQuery: function floatymessage(message){ var box = $j(".floatymessage") if (box.length == 0) { $j('body').append("<div class='floatymessage'></div>"); } box.html(message); // center it box.css("left", ( $j(window).width() - box.width()...

jQuery - How do you select children of children when in the context of 'this'?

On rolling over a wrapper div, I need different nested children to do different things. One div needs to fade to one level of opacity, another div needs to do another thing. It's all wrapped in quite a lot of stuff that i can't tamper with. I have NO idea how to call children in children.... I have tried every frikkin combo of jQuery...

JqGrid pager problem - Total pages and records does not display correctly

Issue: My jqGrid pager shows Page 1 of NaN instead of the correct number of pages. Fiddler shows that I am getting the correct json from my WCF call: {"total":1,"page":1,"records":2,"rows":[{JDEVendorNumber":99999999, "VendorName":"Super Vendor","BillID":"99999999wwerer ", "CommunityName":"Post Abbey ...

$.getJson() Problem and returning an undefined value

I have a php script which produces the JSON object. In my jquery I am using this code to call the php script. $.getJSON("/st/std.php", function(data){ alert(data); $("myspan").text(data); } ); How Do i get the Data from THE JSON Encoded in php File .In the form Iam entering some code which will perform the ajax ...

JQuery/Javascript - Pull all checked contents and put into list

Hey everyone, Currently we have a table with a bunch of data from a database which the user can "check" symbolizing that they use this content. This is also prepopulated such that if it is a returning user, the things they submitted before are checked onload. Since this list of data is long, it is hard to tell what data has been select...

jquery - colorbox plugin, I need to submit form via ajax

If I'm using the colorbox plugin, how do I submit a form via ajax and then make a new modal out of the response? For example, the user clicks a link and a modal pops up. They fill out the form and click submit and then the modal should change to the next form. Then they fill out the next one etc... ...

JQueryUI Dialog display issue

I have the following code which builds a JQueryUI Dialog popup. $j('<div></div>') .html(message) .dialog({ autoOpen: true, bgiframe: true, buttons: { 'Dismiss': function() { $j(this).dialog('close') } }, closeOnEscape: true, height: 'auto', modal: true, ...

ASP.NET a problem with FileUpload control, PostBack and JavaScript requests to the server

Hi, I decided to write here 'cuz I've had enough... As I noticed there is no way to to ommit the full PostBack with FileUplad control, (I tried to deal with UpdatePanel and I also read about iframe). The problem is, when file is uploaded, an asynchronous WebService method is invoked and after it completes it shows the result (some info...

Delay window open on click with JQuery

Here is an example page: http://vincent-massaro.com/modal/modaltest.html I am trying to have a window open with Jquery when a link is clicked, but delay the popup so that a message is first displayed before the popup happens. As you can see from the example the window.open happens not on the click, but on the fade, so this triggers a po...

Not able to append options to select

I am not sure why this works but not when I pass in numbers <form id="form1" runat="server"> <div id="facebookPhotos-iFrameContent"> <div> <p>Log in</p> <p id="LoginButtonContainer"><input type="image" id="btnLogin" src="images/loginBtn.jpg" /></p> <p><select id="facebookAlbumDropdown" /><...

What is wrong with my jquery javascript here?

So I'm attempting to make a page in Visualforce(salesforce's page creator), and am having issues with the javascript aspect of it. Basically what should happen is that the section will generate a series of links. The javascript needs to click those links. I'm using jquery <apex:page standardcontroller="Account" extensions="maininvoice"...

jQuery Carousel jumping to the wrong item

Hello Stackoverflow, I have a perculiar problem with the :last and .before() method not inserting the code before the last element. [edited] I have come up with a new issue :/ The problem is (now that the <li>'s are in order), that the Carousel will now scroll through 4 items but them quickly jump to the next item. Code bel...

Javascript/jQuery order of operations

I'm having trouble with a line inside an if statement executing before the conditional is met. What I want to do is: Check to see if data (big old array of numbers) is already loaded. If not get it and load it into my all_data object. Plot data (or in this case alert it) Here's the code (stripped of many details to be readable var a...