Hey all. Basically, I want the the next image to be clicked using jquery every second:
jQuery:
var i=1;
setInterval(function() {
$(".portfolio :nth-child("+i+")").click();
if (i<5) {i++;} else {i=1;}
}, 1000);
HTML:
<div class="portfolio">
<ul>
<li><img src="images/4.jpg" alt="4" id="promo_one"></li>
<li><img src...
I am trying to get some values from my form into a lightbox that I am calling. Everything works great if I hard code the form values into the jQuery ajax post but I can't get the form values to properly pass into ajax function unless the values have been selected and the page has been reloaded.
So somehow I need to get the values of the ...
Hi. I'm using the html5media library, which automatically replaces the HTML5 video tag on the page with the Flowplayer Flash player for browsers that don't support the video tag. This happens on IE and some older browsers.
I need to detect if the Flowplayer exists on the page and add an event listener to each instance that fires off a J...
I just started getting into jQuery and I'm trying to use the SimpleModal library along with some scrolling features. I have a navigation list and each link opens it's own modal window with a set height and width.
However, for link2, after you click it I want it to open a modal window and the user has the ability to scroll up or down dep...
Hello friends,
$('#filedset').find("select, input, textarea").change(function() {
alert($(this).val());
});
if I use this code when I change anything on my dropdownlistbox I am getting alert but when I change anything on my Input or textarea changed text i am getting on alert?
is that something i am doin...
// Clearing Textarea
$('textarea').focus(function() {
var $this = $(this);
$.data(this, 'img', $this.css('background-image'));
$this.css('background-image', 'none');
});
$('textarea').blur(function() {
if($.trim($('textarea').val()).length){
$this.css('background-image', 'none');
} else {
$(this).css('ba...
Ok, I'm rephrasing this because it got buried.
IMPORTANT
I want to remove this Google Analytics block, using jQuery.
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type...
Hi,
I need to be able to expand and collapse certain sections of a table individually by pressing that section's button but if a user wants to see all the data in the table, they hit one button at the top of the table to expand all the information.
The use should then still be able to collapse sections they are not interested in and if...
I want to launch an ajax call whenever an accordion tab is opened to get the content of that tab. For that I need to know what tab was left and what tab is opened.
From the jquery documentation:
$('.ui-accordion').bind('accordionchange', function(event, ui) {
ui.newHeader // jQuery object, activated header
ui.oldHeader // jQuery obj...
Hi, I am rendering a Menu using Jquery.
When I click on a menuitem, the submenuitems are shown only after a delay. I want to show all the submenuitems at once I click the menuItem. How can I achieve this?
Also there is another issue. Sometimes the subitems are not displayed.
I am placing the html, css style and jquery used for this.
...
Hi,
in the code below, the string sFoodFormReceived1 always gets the value of DateTime.Now. I dont know how to make the date clicked on the datepicker UI bind to the textbox in the gridview gvReservationsWithForms.
protected void gvReservationsWithForms_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
GridViewRow row = gvRe...
look at this script please
$("#change").click(function()
{
var val = $("#new_title").val();
if(val == '')
{
alert("Նշեք խնդրեմ անունը");
return false;
}
else
{
$.post
(
"change_title.php",
{id: id, lang: lang, val: val}
);
window.location.reload();
}
});
where id and lang are global var...
Hi,
I am using jQuery's load function to render some of my content when the document is ready.
$(document).ready(function(){
$('#header').load('header.html',function() {
//do call back function});
$('#footer').load('footer.html');
});
I don't want my callback function to execute when the request completes, but rather when...
Let's say that I define an element
$foo = $('#foo');
and then I call
$foo.remove()
from some event. My question is, how do I check whether $foo has been removed from the DOM or not? I've found that $foo.is(':hidden') works, but that would of course also return true if I merely called $foo.hide().
...
Trying to ajaxify "favorite this song".
The way I understand it, it is desirable to separate javascript from the markup completely to an external .js file. However, we require to pass id of the song along with the ajax post.
We have the following markup
<div id="favorite-song"></div>
The way I would have done it using ASP.NET ajax ...
Hi Guys,
I have a simple function which attempts to calculate height and width of an image using jQuery for a slideshow box. The problem I am seeing in IE7 is the really strange effects padding seem to have on width/height.
I have an image in Firefox and value returned is 450 x 324 [width / height] with CSS values of
border:0 none;
f...
Is there a way in jQuery to get the true opacity of an element? You can, of course, get the element's defined opacity with
$element.css('opacity')
but if, say, its parent has defined opacity 0.5, then the element's true opacity is half of what its defined opacity is. Does jQuery have a function for this? If not, is there an existing p...
Hey all. Basically, I need "(this)" in my function to correspond to this selection:
$(".widget .portfolio img")
But I want alternative ways of running this function, one when it is cilcked, and one in intervals, like this:
function cycle()
{
var poo = $(this).attr("id");
$(".poo").html(poo);
}
$(".widget .portfolio img").cli...
Does anybody uses jMediaelement (http://protofunc.com/jme/index.html) for HTML5 videos? I am wondering how to display a youtube video. I see there's a demo on the homepage of jMediaelement, but the source code is not provided (clever!). Any idea how to? Thanks
...
I am looking for a generalised selector function that does the following:
$(".data").click(function(){
//insert proper selector
)};
<div class="one">
<div class="data">text</div>
<div class="data">text</div>
<div class="data">text</div>
</div>
<div class="two">
<div class="data">text</div>
<div class="data">text</div>
<div class="d...