$('.myElem').live('click', function() {
$(this).hide(500, function() {
$(this).siblings('.myOtherElem').show();
});
});
The above doesn't work because $(this) is no longer in correct scope in the callback. How do I pass my original source element into the callback?
...
Hallo i have this script:
<script type="text/javascript">
function animateIt() {
$(".logo img").slideUp("slow")
}
animateIt();
</script>
When i use slideup. The image going away to the top. But i wil use the slidedown. But when i change slide up to slideDown("slow"). My .logo img is not working? What do i wrong?
...
How can I disable an input-field with jQuery using GM if the url contains text?
I tried
$(document).ready( function() {
if($("url:contains('text')")){
$(".input[id=field-owner]:disabled");
}
else {
$(".input[id=field-owner]:enabled");
}
});
I don't know what I did wrong. And I also don't know whether u...
Hi,
I have following HTML structure
<table>
<tr>
<div id="getData">
</div>
</tr>
</table>
I am using jquery's html() method to add dynamic contents to div id "getData" as:
$('#valueResult').html(data);
var data ="
<table><tr><td><input type="checkbox" name="test[1]" onclick="doSometing()" /> Test</tr></tr></table>
...
i am trying to use the plugin infinite scroll
it requires the selector for the next page link. i suppose that if the navigation is as follows,
<ul>
<li><a href="#" class="active">page 1</a></li>
<li><a href="#" class="next">page 2</a></li>
<li><a href="#">page 3</a></li>
<li><a href="#">page 4</a></li>
<li><a href=...
I want to pass this function a True or a False and have the elements listed show (true) or hide (false) on this input.
I am currently using this function...
function SetElementVisibility(visible) {
if (visible) {
$("#Div1").show("slow");
$("#Div2").show("slow");
$("#Div3").show("slow"...
I asked this question on the jQueryUI forums, but got no response.
I've created a sortable accordion but I can't seem to figure out how to serialize the indexes like you can on a non-accordion sortable.
on my H3 elements I have the id="agendas_1234" and then the following code. But the line where I define the params variable doesn'...
Hi folks!
I have this loop
for( i=1; i < 65; i++){
$('#peperszmit1 #tabs-1 #checkBoxHolder').append('<div class="individualCheckbox"><input type="checkbox" id="checkBoxik'+i+'" name="game1" /> HERE.. </div>');
}
and where it says HERE.. i would like to display value of i . If i just write i inside the div i get 65 checkboxes w...
Right so I'm creating a plugin using jquery what I have thus far is this. .
(function ($) {
$.fn.AppCompFunctionality = function () {
var defaults = {
};
var options = $.extend(defaults, options);
return this.each(function () {
$(this).click(function () {
var currentComps = $("#currentComps").get();
$(current...
okay so i have a log in button on the top of my site that when clicked calles some jquery to show/hide a log in box.
yet i have a search box next to it and when you click on that not only are not able to type in it but it also toggles the log in box the first code should be the jquery and the secong is the html part that calls it. btw i...
I am making changes to a jQuery validator, when there is an error it inserts a div to the parent element. I am trying to remove an the inserted div with by the specific class name from the parent.
$(element).parent().remove('.removeThis');
I thought the above code would work but it does not remove the the div.
...
i am trying to debug why when i use this infinite scrolling plugin, nothing happens ...
$(function() {
$(".posts").infinitescroll({
navSelector: "#pageNav",
nextSelector: ".next",
itemSelector: ".posts .post"
});
});
<div class="posts">
<div class="post">1. ...</div>
<div class="post">2. ...</div>
<div class="pos...
Hello,
I got some help a few weeks ago on some code for a drop down menu but I am wondering if it is possible to make the code shorter because the current code shown below is quite big, any help would be great.
$(document).ready(function(){
$("#zone-bar li em").mouseenter(function() {
var hidden = $(this).parents("li").children("...
I have a button on a page which when clicked makes a ajax request. Viewing the response in firebug and looking at the page it basically returns the exact same page in the browser with the addition of an image and some text wrapped in a table. How would I check this response and see if it contains this text and image and if it find it red...
I try to get line-height of element (this)
It's inside a hover() thats why i use $(this)...
> var lineHeightThis = $(this).css('line-height');
Setting up that var caused trouble. It seems like
it is resetting (this) to "auto" !?
I need to do that to reset it.
> $(this).css('line-height',lineHeightThis);
The overall problem, inste...
Hi,
I have the following string which is a CSS selector:
#downloads > ul > li:nth-of-type(1) > ul > li:nth-of-type(3) > a
This CSS selector works fine in FireFox, CHrome and Safari but IE 6 does not support the nth-of-type selector. The CSS selectors I am working with are generated by Nokogiri and I can not change them.
Threw testi...
Hi I would like to load a page using iFrame on my website. and as a final result I need to hide everything and show just one div's inner text. How can I accomplish it using jQuery?
or maybe another workaround
...
I have to validate my code for IE, I'm trying to use jQuery. The second line works perfectly (although if I add the first line, it breaks [only in IE; works fine in other browsers]). This whole snippet works in other browsers.
$("ul#nav > li:nth-of-type(1n+4)").css("marginTop", "4px");
$("#templates > :nth-child(3n+5)").css("margin", "1...
I'm using localScroll and easing to smoothly scroll my site: http://www.pressedweb.com/beta
Everything is cool, but if the user tries to scroll before localScroll or easing are done doing their thing, it starts flickering and consistently tries to finish the animation.
Thanks a lot guys. StackOverflow is awesome!
...
How to create simple javascript/jquery client side captcha? How it may be realize, thx.
...