Hi to all,
Is it possible using jQuery to select one full link which href contains another variable?
My code is:
var element1 = $(".not-viewed").parents('li').attr("id");
var element2 = $(".videoTitle").attr("href");
Where i need to select a full link that contains 'element1',because there several videos in the page.In my code sele...
Maybe what I am trying to accomplish is not feasible but the general idea is that when a person clicks a table row, the page dims (like a modal) but leaves that row visible for editing. I tried setting the z-index of the table row itself but it did not work. It will work if I set the table rows position attribute to absolute but that s...
I am trying to add a simple delay to a mouseover event of a child and having difficulties. (Still learning!)
This enables me to show the popup after a delay, but shows all of them simultaneously:
onmouseover='setTimeout(function() { $(\".skinnyPopup\").show(); }, 600)'
and this works to show only the popup I want with no delay:
onmo...
<div id="line_numbers"></div>
<textarea cols="65" rows="15" name="comments" id="comments"></textarea>
<textarea cols="65" rows="15" name="matches" id ="matches"></textarea>
there are many examples out there(
http://stackoverflow.com/questions/1995370/html-adding-line-numbers-to-textarea
) but i just want to implement line number...
I wrote this code that populates a <select> box with the results of an ajax call...
(function() {
var cache = {};
var queue = {};
$('select.country').live('change', function() {
var $countrySel = $(this);
var $provSel = $countrySel.closest('tr,.label-and-input').next().find('select.province');
var $p...
The following snippet runs through a bunch of form elements, grabs the name and values and alerts them. If there are 3 inputs, I get three alerts. I need to combine these all so I can submit them via .post but not sure how to do that.
I can't use .serializeArray as I don't have a form tag I can use. Backend is .net and there can be up t...
I think I could use .next on this, not sure, if there's a better way please let me know. I have a tab set up with an UL, each LI in the UL has a 1px dotted border on the bottom except the "active" li. The "active" tab has a background image. I need to remove the border if the LI after any LI has the class active.
<ul id="flowtabs">
<...
JS:
$(function(){
chainAnim('.section','slow','1') });
function chainAnim(e,s,o) {
var $fade = $(e);
var code = "console.log('Done.');";
$fade.each(function(){
code = "$('#"+$(this).attr('id')+"').fadeTo('"+s+"','"+o+"',function(){"+code+"});";
});
eval(code);
}
HTML:
<div id="wrapper">
...
I'm pretty new to ajax and I applied it succesfully to a Drupal site. But I was wondering, how do I get an URL to a page where part of the content is loaded through ajax. Is this even possible? The JSON object is retrieved on click, so how do I make it work when retrieving a certain URL?
I realize this is a very broad questionany, any h...
Apparently, this call to window.open is not valid under Internet Explorer. The Javascript code on my site is not running, I would assume it is due to that error.
The line it tells me the error is on, is the call to window.open, apparently an argument is not valid there.
$('.objeto').click(
function() {
var center ...
Will browsers that use HTML5 use less JavaScript, jQuery, etc. and make things like animations done with just HTML? Will it make Flash less necessary for “smooth” graphics?
In other words, I won’t lose anything by taking the time to learn jQuery since HTML5 is here, will I?
...
I'm working on a new version of the website, and am now finding an issue with my javascript code that isn't being handled nicely.
What I have been doing in the past is
$('#lb_outer_title :h3').html(title);
which changed the text of the title attribute for my lightbox. This worked fine in jQuery 1.3.2, but on the new version (which ...
I have the following code
(function($){
$.fn.kb = function(evt, map, fn, options)
{
var _this = this;
var modifiers = [17, 18, 19];
function precise(a, b)
{
return b.Size - a.Size;
}
if (!this.data("Combos"))
this.data("Combos", []);
var combos = ...
Is
$(document).ready(function(){});
the same as
$(function(){});
?
I believe it is, actually I'm 99% sure it is but wanted a 'second' opinion
...
I have seen many questions raised around PartialViews and Javascript: the problem is a PartialView that requires Javascript, e.g. a view that renders a jqGrid:
The partial View needs a <div id="myGrid"></div>
and then some script:
<script>
$(document).ready(function(){
$('#myGrid').jqGrid( { // config params go here
});
}
</sc...
For a site I'm building, I import my Jquery code from...
http://jqueryjs.googlecode.com/files/jquery-1.3.2.js
...but when I run the site in IE, it gives me various instances of "argument not valid" on line 4031.
This happens when I hover above a field which should be animated on trough Jquery. Here is the JS code I wrote...
$('body...
I've got an app which uses an iframe in a portion of a page, for displaying folder contents from a fileshare. Works great, except, any time a jQuery pop-up window or select menu overlaps this iframe, the iframe always appears on top, hiding the content from the parent page which I want to appear over the iframe.
I've messed around with ...
Hi.
I'm trying to write an application using ajax, with Nginx as frontend, proxying relevant requests to a little application I wrote. All it does is to epoll some sockets and use the file descriptors. Here are some code snippets :
Nginx configuration :
upstream cometutils {
server unix:/tmp/cutil_socket;
}
...
location /test {
pr...
Anyone ever used jclock and know how to remove the leading zero for the 12h setting?
...
Hello,
I think I have a basic understanding of DOM traversal, but I doubt I'm doing it efficiently.
For example:
<textarea name="description"></textarea>
<p class="notes"><small>100 characters or less <span class="remainder"></span></small></p>
I have a keyup event listener on the textarea. I want the .remainder span to display so...