I am trying to implement this tutorial in my application. I have managed to make it work until the point where I had to modify the view controller and add the link to the .ajax.html file.
My code so far:
class MenuController extends Zend_Controller_Action {
public function init() {
$this->_helper->ajaxContext()->a...
This function is written twice to save the checkbox state as well as the corresponding div text. How do I write the code in a function once and then call it twice on load and click events respectively?
$(document).ready(function() {
$("#bquote").load("quotes_in.php", function() {
// a key prefix...
I have a textarea, and am using $('#mytextarea').val(), and when i have text that is '£' i am getting the infamous black diamond with a question mark in it. �, When i package this up as a JSON packet it then gets sent to the server and it interprets it like this: "£" on the server side.
I am sending it to the server with this code:
j...
Hi
I'm making a timetable site for a music festival. The purpose of this site is for people to choose acts they want to see and compile their own personal timetable for the event. At the moment the site has 2 tables:
The full list of acts on at the
festival
The user's personal timetable
Here is my problem. Everytime an act is added...
If I use firebug and type $("<p>").html() into the watch window, I get an empty string back. My guess is because the $("<p>") hasn't been rendered to the document. How can I get the markup for $("<p>") before it's added to the DOM?
...
I've got some code like so:
<div id="thumbs">
<img src="/media/img/banana.png" />
<img src="/media/img/apple.png" />
<img src="/media/img/lobster.png" />
<img src="/media/img/charismatic_duck.png" />
</div>
What I'd like is to work out what the following code needs so that it logs 1 if I click the first ...
I've got this Chrome extension, and it uses jQuery to open a new Window with a YouTube video embedded in it. I do this with
$('#movie_player').get(0).getVideoEmbedCode();
This works great, but you don't get all of the video controls, like quality selection, CC, etc. Is there a way to embed the full player? I would prefer to do it via ...
How do you say :
if there are more than 2 .quick_fact then
My attempt:
if $(".quick_fact:gt(2)") { }
Which evidently is always true.
...
I'd like to add native date pickers to my application, which currently uses a legacy, home-rolled system. Date input support isn't widespread, yet, but if I could present both implementations based on compatibility, that would be ideal.
Is there any way to specify the output of the value given by an HTML datepicker? The default for oper...
I have the following to capture the checkbox check event of form with id="form1":
$('#form1 :checkbox').click(function() {
var $this = $(this);
alert($this.val());
}
I now have another form (id="form2") with checkboxes for which I need to handle events. Is there any way to combine both forms into a single line and have the alert ...
Hi,
I have some html like:
<ul id='foo'>
<span><a>hello 1</a></span>
<span><a>hello 2</a></span>
<span><a>hello 3</a></span>
</ul>
I want to get an array of all the text values of the elements like:
var texts = { hello 1, hello 2, hello 3 };
I'm trying to iterate over each one, is there some way in jquery to just grab...
When I store a jQuery object in a variable, like this:
var $myObject = $("div#comments");
...I can't use the object $myObject!
This is what I'm doing to change the html of div#comments:
$myObject.html(data);
It does nothing. I already tried this way too, this time to select an element inside div#comments:
$("div.comment", $myObje...
I have a "Menu" btn that should slide-open a div with an "accordion" menu in it.
When I add the value hide() (in JS) or "hidden" (in CSS) for the div that contains the accordion, the accordion stops working properly. It doesn't view all the content in it when you click on an accordion section, after opening the div with the accordion w...
I tried using the Moving Boxes jQuery Plugin in Asp.net Mvc. It works in every browser except for IE.
Heres the plug in code. I was wondering if somebody has an idea on what might be different in IE, possibly something along the lines of the way IE parses widths? or fixed widths?
$(function () {
var totalPanels = $(".scrollContainer")...
Hi,
Im evaluating a tree PlugIn for a Admin Interface in Intranets (Speed and Size do not matter). The Internet and a expensive search turned jsTree and the ExtJs' Libraries Tree up as the most complete ones. The differences seem rather minimal, so my questions are:
Which is more stable? As jsTree is a jQuery Plugin, does ExtJs play w...
I want to send an array from main.html to test.php file and receive an other array from test.php , but it does not work.plz help me!
main.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Unti...
I must be thick because I cannot for the life of me get jQuery autocomplete to work. I have searched for many many examples, and it seems that most of them use an older version of jQuery. I found one fairly good example directly from the jQuery UI site: http://jqueryui.com/demos/autocomplete/#remote-jsonp So I modeled mine after that exa...
Here is my situation:
i have a page once clicking on one of it's divs an ajax request fetches more content to the page.
The more content that i am talking about is image gallery content that uses jQuery.
my problem is that once i get the response from the ajax request, i manipulate the DOM.
therefore the jquery ready() function is no...
i am trying to change images of a slideshow using mousemove. but its not working correctly. It only works correctly first time and after that even the mouse is not clicked it assumed that mouse is clicked.
You can check demo here
http://unirazz.com/kb/html/movie.html
here is the code for mousemove
var clicking = false;
...
I have an ashx page that returns the following JSON data that I would like to be able to loop through and add to values to a bunch of li's in a ul.
My question is how do I loop through to retrieve the values.
The data that is returned from the ashx look slike this
{"ImageCollection":
{
"Images":
[
...