I am using the official Jquery Autocomplete plugin. I have an ODBC database with a list of advertisers. I currently have an input box where the user types in part of the name and I am successfully returning a list of partial matches. The problem I'm having is I do not understand how to return both the name and the ID of the advertiser...
I have a button click function that is to run a $.getJSON when the button is clicked. It gets some values from a controller posts those to some form fields and opens a modal that contains the form.
The first time I click the button it runs the $.getJSON posts the values and opens the modal just fine.
when i close the modal and click th...
There is a script
http://gist.github.com/457324
that sets default text (taken from element's title attribute) for empty input[type=text] and input[type=password] elements.
For password elements it is not that trivial though. If I did $(this).attr('value', $(this).attr('title')); for input[type=password] it would just show dots instead...
I'm attempting to parse a JSON feed using the LastFM API but there are certain elements returned in the JSON array that are prefixed with a # that I don't know how to reference.
The feed URL is here and it can be seen visualised here.
My jQuery code so far looks like this:
$.getJSON('http://ws.audioscrobbler.com/2.0/?method=geo.geteve...
How can I exit from $.each loop when a condition is met? I don't want to iterate the collection further.
$(vehicles).each(function() {
if (this["@id"] === vehicleId[0]) {
vehicle = this;
}
});
I tried with break; & return; statement but it looks the execution doesn't not stop at that point. Any idea would be greatly appr...
Grails 1.3.1
I am using a jQuery library that sends a serialized parameter map to the server and it is formatted like so....
item[]=1&item[]=2&item[]=3
In my controller, when I do println params, it comes out...
[item[]: [1, 2, 3]]
I can't seem to get this data out of params in my controller, however. What am I missing?
...
Here's my HTML. I need to bind a click event to "someText"
<div id="container">
someText <a href="#">A link</a>
</div>
"someText" could be any string of text
...
Will the DOM definitely be ready if I place my jquery code right before the </body> tag?
I have some jquery code and when I put it in the $.ready() function I can see a flash of what the page looks like before the javascript code is run.
However, if I put the code right before the </body> tag then I only see what the page looks like ...
Hello, I have been dealing with an odd problem that .click() events happen twice whenever placed in a jQuery Dialog.
My simple test case is below and a live example is here
<div id="popup" style="display: none">
<a href="javascript:void(0);" id="testlink">Test Link</a>
<script type="text/javascript">
$('#testlink').cli...
Hi,
I am working with a tester who is using Selenium in my latest project.
I was trying to get some information out of him as to how i needed to name my CSS classes applied to the dynamic elements on the page that he will be testing.
I think he is rather new to this himself so was going to put our findings here for comment:
Testing ...
Hello there,
I would like to add a button to the current page using html()-function.
This button needs to be selectable, and alert('click') when it is clicked. This seems impossible.
Look at this code
<script type="text/javascript">
$(document).ready(function(){
$('a').click(function(event){
$('div').html('<form method="p...
Hello,
I'm working in wordpress, trying to figure out how to change the css color of a side nav element when a remote image is hovered.
I would have done this easily with CSS and just assign the CSS hover class for each item, but since this is a CMS, the navigation and the image gallery will change dynamically.
So, I'm looking for a J...
I've got a custom errorPlacement function that is updating a seperate message container with a custom way of displaying error messages.
As part of the form I'm validating, I have a fair number of input text boxes to validate (think lines of numbers being checked against some kind of result), and as part of this need the error messages t...
When users want effects to happen between page loads (ie, old content fades out then new content back in), I typically build the site as follows:
index.php, about.php, etc...
<?php if(@$_SERVER['HTTP_X_REQUESTED_WITH']==''){include('includes/header.php');}?>
<content>blah blah blah</content>
<?php if(@$_SERVER['HTTP_X_REQUESTED_WITH']=...
Is there any way using jQuery's .bind() and .trigger() calls to execute a user defined function (ex: save ()) and act upon the return from the method? For example:
$("#aForm").bind ('save', function () {
return true;
});
and then:
if ($("#aForm").trigger ('save') == true) {
doSomething ();
}
...
Hello,
I am implementing the looped slider plugin (see: http://nathansearles.com/loopedslider/example-4.html) on a website, and need to add captions to the images (that just appear as text beneath their corresponding images).
Could anyone point me in a direction of where I could start? There is already so much jquery going on in this ...
I'm trying to build a website that has one set of staff in the database, and multiple departments. Each staff member may be part of multiple departments. The back-end code is fine with a many-many setup like so:
`staff` `depts`
| id | name | | id | name |
| 1 | Alice | | 1 | Legal |
| 2 | Bob ...
I cannot for the life of me figure out why this markup is not wrapping. There's nothing special about it, except that it is generated by javascript. Here's the code. Any thoughts on why it's messing up would be welcome.
I can include the js if you need. but basically it reads the text in the textarea, extracts the words, and creates a l...
Goal: read in the current value of a set of text boxes. if the value is "None" replace the value with the value provided. Once a value is changed stop.
When I use span and .text() instead of a textbox and .val() everything works. However, the textboxes are part of a form.
Any idea why it would return as "undefined"?
(basically i'm ma...
Hi All,
I have a web application that utilises both the MVC Ajax calls:
Html.ActionLink() rendering as Sys.Mvc.AsyncForm.handleClick( in the page source
and: jQuery Ajax calls, eg:
$.post()
Now I can easily set a generic Ajax indicator to show and hide when the jQuery is making an Async call using:
$('#indicatorId').ajaxStart(fu...