I have a very simple sinatra site that I'm trying to access via ajax through jQuery.
To keep things incredibly simple, this code snippet:
get '/behavior_count' do
"60"
end
which returns "60" in the browser, shows up as an empty string when attempting to access the site via $.get in jQuery. The strange part is in Firebug, while the...
Hi,
I'm using jQuery to load ajax content on to a page. However, trying to use jQuery's .remove() function doesn't seem to be working to remove the dynamically loaded element.
My example function:
function deletePerson(personID){
if (confirm("Are you sure you want to permanently delete this person?\nYou cannot undo this action.")...
Hi,
I have used jqgrids to display static values. But I have a scenario where I need to have checkboxes and dropdown values to be displayed in JQGrid columns. Depending upon whether I check or uncheck the checkbox. Any thoughts or comments on how to build jqgrids with Dropdowns and Checkboxes?
...
I'm trying to pass "this" from a clicked span to a jQuery function that can then execute jQuery on that clicked element's first child. Can't seem to get it right...
<p onclick="toggleSection($(this));"><span class="redClass"></span></p>
Javascript:
function toggleSection(element) {
element.toggleClass("redClass");
}
How do I refe...
Hi again!
First of all, after "testing" a while I have to say, stackoverflow is really really cool!
To my question:
I want to check if $(this) has not any parents that have a class or id specified in an js-array.
By now I did this with "eval", but Andy E. just convinced me, that it is better to abandon "eval". However I have no clue h...
Using javascript or jquery, how can I make a Required Field Validator control (of ASP.NET) visible. If we check the viewsource of the Required Field valiator, we can see that the visibility is false initially. $("#spanReqFieldValidator").show() / fadeIn() wont work.
Any thoughts ?
From googling, I understand that jQuery has some issue...
I would like to call jQuery JSON function and pass back results as JSON object (Javascript array?), but I am not quite understanding dynamics of what is happening here.
myJSON = myFunction(productNo)
$.each(myJSON, function(i,user){
alert (user.description)
}
function myFunction(productNo)
{
$.getJSON
(
"processors/proces...
Hello, I am trying to make my pagination script a bit more dynamic and am needing some help with the calculating of the page numbers part.
I have this script below which calculates the number of pages using php, however I would like to add other buttons that when clicked will filter and sort out data which means the pagination numbers n...
When you mouseenter .li_group class it does a slide down effect on 1 single <li> tag, everything goes smoothly, but during the delay if you take your mouse off and on .li_group it "queues" the effect and slides the li down, delay, slides it down again etc etc... I have tried every way i can think of, even stop(); but it still does it... ...
I am not the most experienced jquery author and I came up with a solution to a simple problem, but to me it doesn't seem like the best way to do it. I think the code explains it best:
$("#play_button").click( function () {
$("#play_button").hide();
$("#pause_button").show();
});
$("#pause_button").click( function () {
$("#p...
Hello.
How do i show an input field if #tryout checkbox is checked.
I already have this which hides 2 fields, now i want to show 3 new fields..:
$('#tryout').click(function () {
$('#title').toggle(!$(this).attr('checked'));
$('.navn').toggle(!$(this).attr('checked'));
});
...
Is there a simple, one-command way to get the data of a form as it would be if it was to be submitted in the classic HTML-only way?
For example, in:
<form>
<input type="radio" name="foo" value="1" checked="checked" />
<input type="radio" name="foo" value="0" />
<input name="bar" value="xxx" />
<select name="this">
<option value="...
I am using the jquery ui, I downloaded the entire toolset.
I put the css and images into a folder like:
/images/jquery/base/
/images/jquery/ui-lightness/
How can I configure this so it works?
(if that's possible)
...
Hi,
jCarouselLite not setting width and left values on div. Also, in firebug the div and ul and greyed out although the div has:
visibility: visible;
Incidently, the width and height attributes on the ul and subsequent li's are set to 0, shouldn't jCarouselLite be setting those?
Images are being loaded in the DOM - but not displaying...
I'm looking for a library or jquery plugin (etc) for a dynamic, multi-value form selector. Think of gmail's "TO" field when composing email.
Looking for:
Populate field(s) with 0 to n employee ids.
Currently have 5000 employees.
First or last name searching.
I've rolled my own in the past. However I'm trying to focus my de...
I have a report where I am using jquery ui's datepicker for the start and end dates for the report data.
When a user pages through the data, I want the maintain the date ranges on the picker.
How can I do this?
Say I modify the url's for the next/previous buttons based on the values of the datepicker, how would I reset the datepicker ...
Hi everyone, recently I came up with the following problem:
In my web site in all html pages I call a function in body onLoad event:
<body onLoad="func1();">
This is part of my template for html, so it appears on every page in my site and I can't change that. Now, the deal is that on some pages, I need to call some other functions o...
Apologies if this is overly basic, but I couldn't find much info with my searches.
I have a simple link: <a href="delete">delete</a>.
Clicking the link deletes an item from my database.
How do I make the link show a popup (JavaScript alert box?) with a message:
Are you sure? [Yes] [No]
I'd like to use jQuery instead of inline Ja...
Apologies if this is an overly simple question, but my searches are getting me nowhere.
I have a jQuery function which produces an error on some of my pages which do not contain the #message input:
Error: jQuery("#message").val() is undefined
Line: 56
And my jQuery function:
function updateCountdown()
{
var $left = 255 - jQuery(...
When I hide a selection:
$("#someselector").hide();
I usually put it on the bottom. When that webpage shows up, for a brief moment I see the hidden selection. Then it disappears, as it should.
That's not quite what I wanted to see.
Is there a way to stop that quick view of the "hidden" selection?
...