I have a function that takes an element, and then shows all the other elements that have the same class. I know how to show the elements of a give class, but I dont know how to find out what the class of the given element is. Any ideas? I've looked at the docs quite a bit, but I'm not seeing anything.
...
I have a page containing a set of jQuery tabs. All the tabs point at the same target div, but load it with different content via ajax. When I perform the initial full page load I need to set the active tab differently depending upon various factors. The content in the target div is already set on the server for this initial load, so I...
hello
i'm trying to make a div have a background image but only for a specific time:
pseudo code:
div has background image, after 1 sec passed div has background none,
anyway doing this in jquery?
regards
...
now , this my code
<button class="delclass id="b1"
name="b1" value="b11">del</button>
<script type="text/javascript">
$(document).ready(function () {
$('.delclass').click(
function () {
alert('1111');
alert($(this).attr('value'));
re...
Give the following Ajax call in jQuery:
{
.
.
.
,
getSomeData: function(args, myUrl, foo) {
$.ajax( {
type: "GET",
url: myUrl,
data: args,
async: true,
dataType: 'json',
success: myHandler
});
},
myHandler: function (data, textStatus, oHTTP, foo){ .....
Hi
I want to have a check in my javascript if the page loading up is on my local machine.
The reason why I want to do that is that when I developing I like to make sure that both my server side(C#) validation is working correctly. So I like to see both the client side and server sides errors to show up.
So while I am testing I have a ...
I have an asp.net mvc site and i want to call the server when i change a dropdown list. my code hits the server controller action but i never get the callback. Is there any gotcha that i am missing here?
Here is my controller action:
public ActionResult LoadTeamsandApplications(int id)
{
WorkstreamRoadmapViewModel vm ...
My script is supposed to display the first 10 images in the MySQL database and have the script hide the rest of the users images until the user clicks the link <a href="#">View All</a> and have the rest of the images slide down when the user clicks the link.
My Question: So my question is that my images won't display when the user click...
Let's say that I have a div $container with position: relative, and a div $foo within it with position: absolute. I want to get the position of $foo relative to the container. jQuery makes this easy:
$foo.position()
which returns an object with top and left properties, specified in pixels. The problem is, this number is no longer accu...
When I'm attempting to switch between filters and loading up different jqGrids in succession, I sometimes get this error in FF:
i.p is undefined (line 108), which is this line:
j.p.lastsort=b.inArray(j.p.lastsort,f);if(j.p.treeGrid)j.p.expColInd=b.inArray(j.p.expColInd,f)},setGridWidth:function(f,k){return this.each(function(){var i=th...
I am loading a page into a div via the jquery load function. The actual loading part is fine. The code looks basically like this:
$("div#loadhere").load("newfile.html?" + new Date().getTime());
In newfile.html I have a series of divs, and I have code that (for testing) sends an alert when a div is clicked. That's fine too.
The proble...
This is a follow up to my last question here. The answer posted there actually does not work. So here is the challenge. You are given this code (assume jQuery included):
<input type=text>
<script>
$("input").val(**YOUR PHP / JS CODE HERE**);
</script>
Using jQuery - and not by injecting PHP output directly into the input tag - fai...
I was in search of a way to show a status indicator using jQuery and I found a solution in the jQuery Cookbook, it showed this solution
(function($) {
$(document).ready(function() {
$('#ajaxStatus')
.ajaxStart(function() {
$(this).show();
})
.ajaxStop(function() {
$(this).hide...
I have a simple getJson request:
$.getJSON('JsonTest', function(o) {
alert(o.Test);
});
It works, but in Firebug the "o" never gets turned into an object, but stays a string:
{"Test":"Hello"}
If I do an
eval('(' + o + ')')
It gets evaluated fine, the only thing I can think of is that there's some sort of cross site scripting pr...
I want a generic error handler for my forms
var errorsBox = function() {
var $errorBox = $('#form-error');
return {
add: function(errors) {
if ($errorBox.length === 0) {
$errorBox = $('<div id="form-error"><ul></ul></div>').appendTo('form');
};
$errorBox.find('ul > li...
Does anyone know of a plugin that allows you to roll over an anchor link and see a preview of the webpage?
So essentially we may have a link on the page to say www.mysite.com and when you roll over the link I'd like to see a preview of the site.
I know there are plugins out there that show you an image file but I'm looking for somethin...
I was curious if it was possible to look at an images width, and if the width is less than X number, then it would get a certain class.
Essentially I want to specify three classes for images like so:
If width is less than 100px then the image itself will have the class .small
If width is less than 400px then the image itself will get ...
I want to detect when user clicks a link in iframe and changes the source of iframe, because I want to resize it. Also I use jQuery. What is the best way to detect this?
Actually I need something like this (this example is in jQuery, it does not work, I imagined this)
$('#iframe').live('load', function(){ alert('src is changed')});
...
Is there a way to reload a PHP page when a users clicks a PHP link and then have the page jump to a certain spot on the same page using PHP or JQuery like an HTML anchor?
Here is the PHP link below.
<a href="../index.php?uid=' . $user_id . '&view=member">' . $user_name . '</a>
...
In IE Java-script load slower than Firefox, Safari and Chrome?
Is there a way to load JavaScript quickly in IE also?
General best practice is to keep JavaScript at bottom of the page, does it make Js rendering more slow in IE?
Edit:
When we apply any jquery plugin to website to make any usable or interactivity then in IE effect shows...