I've read about issues where the mousemove event is fired twice in Safari/Webkit, but the problem I'm facing is that mousemove fires even when the mouse is not moved. That is: it already fires when the mouse cursor is positioned above the context that the event is attached to when the page is loaded/refreshed. And because I'm attaching i...
I noticed some weird (and to my knowledge undefined behavior, by the ECMA 3.0 Spec at least), take the following snippet:
var foo = { bar: "1", baz: "2" };
alert(bar);
with(foo) {
alert(bar);
alert(bar);
}
alert(bar);
It crashes in both Firefox and Chrome, because "bar" doesn't exist in the first alert(); statement, this is as...
How do I get Fancy box to target a specific DIV ID on a page and not request the whole page in the fancybox.?
This my code so fare
$(function() {
$(".style_image a").live('click', function(event) {
$(".style_image a").find("#show_style").fancybox();
});
});
This don't work?
I originally tried the following:
$(functio...
I want to know if it is possibe to return a view as a JSON object. In my controller I want to do something like the following:
[AcceptVerbs("Post")]
public JsonResult SomeActionMethod()
{
return new JsonResult { Data = new { success = true, view = PartialView("MyPartialView") } };
}
In html:...
Hi everyone,
I have a strange jquery problem with multiple event handlers. What I'm trying to achieve is this:
User selects some text on the page
If the selection is not empty - show a context menu
If user clicks somewhere else - the context menu should disappear
I'm having troubles with the above i.e. sometimes the context menu a...
My site is a single page website with a very large "canvas" size. and to navigate around the site i'm using jquery scrollTo and jquery Dragscrollable plugin.
in IE 7 & 8 the scrolling/dragging movement is very jagged. at first i thought it was my script or some other plugin that's causing this. but after i stripped down everything it's ...
Hello!
I have some hidden inputs like this
<input name="exam.normals[1].blahblah" ..../>
I would like somehow to replace the [1] with a number that I want (index).
I aint lazy but I am trying to find a good way to do this...
A solution would be a replace of exam.normals[1] with exam.normals[+ index +] but I should substr the whole s...
I'm doing something very similar to the stackoverflow question preview only much more basic.
user types in text area -> keyup shows what they've typed in preview
new lines aren't working
$('input, textarea').keyup(function(){
var value = $(this).attr('value').replace('\n', '<br />').replace('\r', '<br />');
...
I like to select an element by more than two condition.
for example
name is some name and checked
how can I do this?
...
I am trying to call my function named isUrgencyTypeValid from my javascript code but it is not working. Please check what is the problem in my code.
Alert should get displayed which is not being displayed
My javascript function is not being called.
HTML Code
<td colspan="2" align="center"><input id="btnSubmit" type="submit" val...
Hi
I have a rails form with a nested form. I used Ryan Bates nested form with jquery tutorial and I have it working fine as far as adding the new fields dynamically.
But when I go to submit the form it does not save any of the associated attributes. However if the partial builds when the form loads it creates the attribute just fine. I...
Hello,
Is it possible to convert html tags to html entities using javascript/jquery using any way possible such as regex or some other way. If yes, then how?
Example:
<div> should be converted to <div>
Note: I am not talking about server-side languages.
...
I built a Jquery dropdown menu using this tutorial:
http://noupe.indexsite.org/tutorial/drop-down-menu-jquery-css.html
It works across browsers except for IE7 (shooooocking). There seems to be a z-index sorting problem and the drop down menu shows up under all of my other JQuery elements. Im not sure how to set the z-index so that it s...
I know that to filter an element with an atttribute called attrName which has value attrValue I do:
filter("[attrName='attrValue']")
but looking at the docs http://api.jquery.com/category/selectors/ I can't see an option to select all elements s.t. attrName>attrValue
Will this work
filter("[attrName>'attrValue']")
...
hi guys,
i'm new to the asp.net mvc.
and i have a link which will popup show a 3 panes listbox which allows the user to select country, region and language.
and when the user click on the language, this will redirect back to the controller and refresh the page and show the proper localized content.
i was thinking of using a jquery dia...
I'm using the Google API to get a user's location on this site. How would I go about getting the weather for that user from Yahoo or somewhere?
UPDATE: Ok so I'm going with Yahoo, but I've never done an HTTP GET request before. Im using jQuery and the following code:
function getWeather () {
$.get("http://weather.yahooapis....
Hi guys. i'm stuck with my table. need create toggle rows function. but i no idea how to find sub rows in table. Some one can help me?
I have table with many rows > 500
All Rows have class="row-1,row-2.....row-600 etc"
And all main rows also have class="parent"
between each "parent" rows i have 6 rows
So i need for toggle/collapse ...
hello, I want to do a sort of photo editor,
i use uploadify to upload images
here are my files: http://www.mediafire.com/?3uzzgx5onzn
the problem is: after upload the images i dinamicaly generate a thumb .. When I click on it it show me the large pictures in another page, i want to show the picture in a div or a paragraf! after I refre...
I have a jQuery code, but need it working by using Mootools:
if ( $("span.mailme").length ) {
var at = / AT /;
var dot = / DOT /g;
$('span.mailme').each(function () {
var addr = $(this).text().replace(at, '@').replace(dot, '.');
$(this).after('<a href="mailto:' + addr + '">' + addr + '</a>');
$(this).remove();
});
}...
I built some cross fade rollovers in IE7 using this single image technique:
http://jqueryfordesigners.com/image-cross-fade-transition/
It works by placing the rollover image in the background and fading the original image state when the user rollovers the image. IE7 hates it. The rollover state shows up directly below the original imag...