Hi all:
In my code, there is a cluetip that binds itself to an anchor. I need to know what sort of properties can I assert when unit testing it?
At the moment, all I could do is to assert the id of the cluetip, which seems insufficient. I want to find out whether there is some sort of class in cluetip that changes when it is binded t...
I would really like to deploy my project using jquery but afraid it may annoy the dail up users. So is it possible to integrate JQuery within the browser itself?
...
I was just wondering if it possible to make an ajax request from a view to an action which injects image data directly in to an image tag.
To give more details, i am borrowing some code in stackoverflow.
Controller;
public FileResult GetImage(int id)
{
return File(PhotoHelper.GetImageBytes(id), "image/jpeg");
}
View:
<%= Html.Im...
<img style="cursor: pointer" src="../common/images/plus.jpg"/> View History($revisions)
How to select the image button above? I want to select image with a source of
../common/images/plus.jpg
and of course the image must be clickable.
I added
<script>
$("img[src=../common/images/plus.jpg]").click(function(){
alert("ok");
}...
hi guys,
I have textboxes with textmode as multiline in my gorm.I have to apply css to that textboxes through jQuery.For that i used following script.
$(document).ready(function() {
$('input[type=textarea]').addClass("INPUT");
});
Is there any syntax problem in above script.Can anybody help ?
...
I'm just learning jQuery, figuring out what's possible, finding my way around.
I'd like to have a div "slide out" like an accordion, but I don't want to pay the cost of the jQuery UI download, and also I want to allow multiple divs to be open at the same time.
How does it work? How is the slide-out effect of the accordion done, insi...
I'm trying to write an if statement where if one of the elements has it's display set to "none", I want the parent element to also display "none"...
This is the code I'm trying, which doesn't work...
/* tried this first */
if($('#prevx a').attr('display') == 'none') {
$(this).parent().attr('display','none');
}
/* and then this *...
Hey,
I am having a peculiar problem with getting an integer from an ajax response. Whenever I call the following code, parseInt(data) returns NaN despite data being a string.
function poll() {
$.ajax({
type: "GET",
dataType: "html",
url: 'images/normal/' + userId + '/' + saveCode + 'progress.txt',
error: fun...
I am trying to detect when the user has left the tinyMCE editor window but I am unable to do so. Here is the code that i think should work (but isnt):
$('.mceEditor').blur(function(){
// I would expect this to fire when the user leaves the
// tinyMCE editor, but it never seems to fire
});
I've also tried:
$('*')
.not('.mc...
I need to do alphabet navigation with paging for my grid/table in asp.net mvc(C#) application.
I am looking for something similar to jquery ListNav
The above plugin is good in doing alphabet navigation, but when a particular alphabet contains more than hundred records/rows, i need to implement paging with it. So the user wont have to s...
the problem is whenever I use $.get, $.post or $.ajax, I can't find a way to trigger a callback when the server is processing something. I can do it with the ajaxform plugin via the beforeSubmit method, but with the formerly mentioned functions, I can't find a way to do it. $.ajax has a beforeSend method, but according to the documentati...
Does anyone know of a JavaScript minifer that can detect unused code and strip it out.
Google Closure seems alright but it appears to only compact.
I'm looking for something much more advanced, where it can look through my JavaScript and not only compact but also remove unused code.
Anyone know of such a tool?
The use base being, I u...
I have this code:
$('.be-delete').live('click', function(e){
e.preventDefault();
var object =$(this);
var url = $(this).attr('href');
$.ajax({
url : url,
error : function(){alert('An error has occurred, no updates were made')},
success : function(){
object.parent().fadeOut('slow', func...
strong text i need to generate checkbox for 2 different data Table in a single drop down control
like
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script src="../Scripts/jquery-1.3.2.js" type="text/javascript"></script>
<script src="../Scripts/ui.core.js" type="text/...
Hello There,
I generate a div for my javascript automated validation script. It is generated with below code:
var alertbox = document.createElement("div");
Now how do i center that div programatically both horizontally and vertically?
Note: Currently I am showing an alert box but once i know how to center a div, i will
replace the a...
I noticed that when you hover the mouse over the reload and search buttons at the bottom of the grid, a tooltip appears indicating "reload" and "search" .. I'd like the same behaviour with the next page buttons (the left,right arrows) , last page button. Any idea how i can accomplish that without modifying any source code? I noticed that...
Hi,
Is it possible to apply MVC pattern to javascript?
...
in some cases, this will not work:
("#id").addClass("class");
whereas this will:
("#id").css('color','Blue');
why would it fail and how to add class otherwise?
...
I have a table like this:
| Update | Name | Code | modification date |
| | name1 | code1 | 2009-12-09 |
| | name2 | otehercode | 2007-09-30 |
Where the Update column contains checkboxes <input type='checkbox' />.
The checkbox initial state is determined before rendering the t...
I'm trying to get Intellisense to correctly work for closure. As a plugin author, I always use a closure to create an isolated environment for my plugin code:
(function($) {
// code here
})(jQuery);
But the problem here is that Intellisense doesn't pick up that jQuery is being passed in the execution of the function. Adding $ = jQue...