Right, idiot moment coming up. I've done a search, but can't find the right solution.
I've got a jQuery selector selecting a class, maybe an ID, in fact it could be anything, this selector is fed into a function I'm programming.
I need to be able to figure out the type of each matched element, for example:
<div class="target"></div>
...
hi, i have a div with height:100px and overflow:auto
the content is dynamic.
i want scroll the div in the bottom
i tried with
$("#chat_content").scrollTop($("#chat_content").height());
but if the content is bigger than 100px
$("#chat_content").height() returns 100 and the div isn't scrolled on the bottom
how can i do?
thanks
...
I have a javascript function with arguments that I want to call in jQuery and I am stuck.
I tried this :
$("a").click(highlight(arg))
but it doesnt work.
Any ideas ?
Johanna
...
I'm looking for a nice way to mark/select all elements between two selected elements.
Imagine
<parent>
<p>...</p>
<p>...</p>
<p>...</p>
<p>...</p>
</parent>
There's a click handler on parent. The user now can select two p element in this list an then all p-elements in between should get 'activated'.
I'm thinking about a sy...
i am using a label
<asp:Label ID="lblMessage" runat="server" Text="" BorderStyle="Solid"></asp:Label>
in script part iam doing something
$('span[id$=lblMessage]').click(function()
{
$('#lblMessage').hide(slow);
});
but it is not working
...
Hello,
I've got a blog with lots of div.contents, each of which I'd like to have a height as a multiple of 22px (so all the text lines up with a background image of a grid). I'm imagining you'd probably do something like:
// loop for each div.content
// var height = $('div.content').height()
// var modulus = height%22
...
Hello,
and there we go:
I'm writing(in fact it feels more like trying and asking) a GreaseMonkey script using JS and including(also using) the jQuery library.
I created another table with some input-fields. Example(input-fields-only):
+ " < input type=\" text\" id=\" field_1\" name=\" min_field_1\" value=\"\" > "
+ " < in...
I need to detect whether the user has pressed the dot key in the numeric keypad. I've written this first draft that works for me:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/...
Hi I'm using struts 2 with JQuery plugin (http://code.google.com/p/struts2-jquery/). I'm trying to load a target div, i have load the jar, i've put the tag :
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
<sj:head/> in the head,
this is the script
<s:url id="ajaxTest" value="listDossier.action"/>
<sj:a id="link1" href="%{...
Hi
I'm using "plupload" plugin.
I have this input form :
<div id="flash_uploader" style="width: 610px; height: 330px;">You browser doesn't have Flash installed.</div><input type="text" name="categorie" id ="categorie" value="" /><input type="submit" value="send" />
I try to get the value of "categorie" with "multipart_params" but th...
How to drag and drop multiple rows using jqgrid i.e Can i drag more than one row?
...
I have a tab (called firsttab) with in his content another tab (called childtab). We bind the tabshow-event to the firsttab.
if we click to one of the tabs in "firsttab" all work fine (Tab 1 - Tab 5)
if we click to one of the "childtab" tabs (Tab 1.1 - Tab 1.3) the tabshow-event who are bind to the "firsttab" is triggerd.
Testcase: ht...
Please help me in this script, what is the problem?
I'd like to addClass "green" to the 5th li.hr in every ul containers in my site. Thanks.
$("ul li.hr").each(function() {
if ($(this).length = 5) {
$(this).addClass("green");
}
});
PS: if its possible with CSS only, tell me how please.
EDIT: the UL got mixed elements, like:
...
Do you know how to hide the classic “Image not found” icon from a rendered HTML page when an image file is not found?
Is it feasible with JavaScript\jQuery\CSS?
...
I don't know why this is.
But for some reason, my google maps script is loaded in the page, but it is not displayed.
I'm curious about what i'm doing wrong.
Here's my html.
<ul class="address">
<LI><STRONG>Titel:</STRONG><br/>Text
<div class="gmap" address="Stationsstraat 23 8780 Oostrozebeke"></div></LI>
</ul>
<ul class="address">
<...
Hi,
I've been given some encoded polylines to display on a google map. However I'm using JQuery for a lot of the front end functions and am now stuck trying to find the correct syntax for displaying encoded polylines using JQuery. The standard syntax for adding an encoded polyline is
var polyline = new GPolyline.fromEncoded({
color: ...
I have the following init code for the datepicker, but the default 'Choose Date' link is displayed, not the image. This is in an MVC project, but that shouldn't affect anything to the best of my knowledge.
$(function () {
$(".date-picker").datePicker({
showOn: 'both',
dateFormat: 'dd-mm-yy',
...
How to find a z-index value of a element by jquery i.e.
I have 2 divs, both are positioned absolute and z-index 10, 1000 respectively.
But unfortunately IE6 displaying second div which has z-index 1000 below the first one.
So I want to check what the z-index value of second one and first one at run time in IE6.
Please help.
...
I intend to make a browser game with jQuery, I would need a canvas object in which I can place many visual elements and animate them to some extend. Is this entirely possible with just jQuery? Some may point to HTML5 canvas but it's specification isn't complete so I'm not too fond of it.
...
How to insert dynamically iframe in a div with jQuery?
$(document).ready(function() {
$("div").html("<iframe src='http://google.com'><iframe>");
});
This doesn't work.
...