Have any bridge libraries been developed for PHP that provide access to the jQuery framework? Ideally it would be nice to have something fairly extensible so that creating jQuery-based content using PHP code would be fairly easy and customizeable. Does such a thing exist yet?
...
Consider the following code:
$("a").attr("disabled", "disabled");
In IE and FF, this will make anchors unclickable, but in WebKit based browsers (Google Chrome and Safari) this does nothing. The nice thing about the disabled attribute is that it is easily removed and does not effect the href and onclick attributes.
Do you have any su...
I'm working with jQuery UI's droppables and am wondering what the best way to make the dropped clone use a different IMG SRC than the item being dropped.
In the photo manager demo there, the thumbnail gets dropped into a slot that's the same size. I'd like to drop a large image into a small slot, and as such I need its clone to use my t...
I am writing a fairly basic script using jQuery. However, the script behaves differently depending on whether I am running it on my local Web server (localhost) or on a production server.
On development, the following code returns the HTML I'm expecting:
$('#objID').siblings('.mAddress').html();
On production, the same statement r...
I'm trying to resize an embedded object. The issue is that when the mouse hovers over the object, it takes "control" of the mouse, swallowing up movement events. The result being that you can expand the div containing the object, but when you try to shrink it, if the mouse enters the area of the object the resize halts.
Currently, I...
It seems that jQuery has taken the throne for JavaScript frameworks and I was wondering exactly why. Is there a technical reason for this or is it just that they have evangelists? I have been really happy with using Prototype myself. Should I use jQuery for my next project?
...
I am going to be starting a javascript reporting engine for my website, and have started some prototyping using MooTools. I really like being able to do things like this:
function showLeagues(leagues) {
var leagueList = $("leagues");
leagueList.empty();
for(var i = 0; i<leagues.length; ++i) {
var listItem = getLeagueLi...
I need to get just the first item (actually, just the first key) off a rather large associative array in JavaScript. Here's how I'm doing it currently (using jQuery):
getKey = function (data) {
var firstKey;
$.each(data, function (key, val) {
firstKey = key;
return false;
});
return firstKey;
};
Just gu...
If you are using ASP.NET MVC how are you doing grid display?
Rolled your own?
Got a library from somewhere?
These are some of the known grid display solutions I have found for ASP.NET MVC
ASP.NET MVC Flexgrid - Has nice column layout method
Code based ASP.NET MVC GridView - simple, small, clean
MVC Contrib - grid from codePlex
jQue...
I have a simple HTML. I am using the JQuery for AJAX purpose. Now, I want to put my javascript function in a separate javascript file. What is the syntax for this? For example, currently my script section in the HTML is something like this:
<script>
<script type="text/javascript" src="scripts/scripts.js"></script>
<script type="text/ja...
I need to copy data values from one element to another, but jQuery's clone() method doesn't clone the data. And I can't iterate over the data either:
element.data().each
because data() is a function and not a jQuery object. It seems I have to keep a separate list of attribute names and reference those but that seems too hacky. So how ...
In jQuery, suppose you have an element of some kind that you're hiding and showing, using .hide(), .show() or .toggle(). How do you test to see if that element is currently hidden or visible on the screen?
...
Say I have the following:
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ul>
How would I select all the child elements after the first one using jQuery? So I can achieve something like:
<ul>
<li>First item</li>
<li class="something">Second item</li>
<li class="something">Third item</li>
</ul>
...
I have the following code in my file to load a div with HTML from an AJAX call:
$('#searchButton').click( function() {
$('#inquiry').load('/search.php?pid=' + $('#searchValue').val());
});
This works fine in Firefox and Google Chrome, but whenever I do the search in IE I get redirected back to index.php. I grabbed the URL from Fir...
I have a repeater that outputs divs like the following for every item returned from some method.
<div class="editor-area">
<div class="title">the title</div>
<div>the description</div>
<div class="bottom-bar">
<a href="link">Modify</a>
<a href="link2">Delete</a>
</div>
</div>
I need to have a textbox on...
How can you change the href for a hyperlink using jQuery?
...
This is my first time attempting to call an ASP.NET page method from jQuery. I am getting a status 500 error with the responseText message that the web method cannot be found. Here is my jQuery $.ajax call:
function callCancelPlan(activePlanId, ntLogin) {
var paramList = '{"activePlanId":"' + activePlanId + '","ntLogin":"' + ntLogin...
I am using some nested layouts in Ruby on Rails, and in one of the layouts i have a need to read in a string from a div and set that as the title of the document. What is correct way (if any) to set the title of the document?
<script type="text/javascript">
$(document).ready(function() {
// ???
});
</script>
...
To make click-able divs, I do:
<div class="clickable" url="http://google.com">
blah blah
</div>
and then
$("div.clickable").click(
function()
{
window.location = $(this).attr("url");
});
I don't know if this is the best way, but it works perfectly with me, except for one issue:
If the div contains a click-able element, ...
Using answers to this question, I have been able to populate a select box based on the selection of another select box. ( I posted my answer here) Pulling the data from an array structure built server-side, stored in a .js file and referenced in the html page.
Now I would like to add a third select box. If I had 3 sets of data (model, m...