Syntax to timeout message or fade in and out after JQuery validation plugin code
I want to have a message show briefly on the same page (either with timeout or fade in and out) after a contact form is submitted, but I am having trouble applying the syntax to my code (which is based on the JQuery validation plugin sample code, and differs somewhat from the examples I've seen for timeout or fade in out). The code which is used to validate the form, submit the input to sendmessage.php, and display the message sent back is: $(function () { // shorthand for $(document).ready(function()
Show pre-load image during images load but all images are different size
I want to display pre-load image center of image's div. But all images have different size so pre-load image can not be displayed in center of each image. Thanks for advance!
Bundling all Jquery files
In my asp.net master page, I have around 15 script tags pointing to different JQuery main and plugin files. Is there a way we can bundle all these JS files into a single file so that the amount of downloads can be minimized?
scrollTop - scroll with window only in Firefox
Hello, i have a div box which should smooth scroll with the window. So i wrote this: var currentTop = parseInt($(".video").css("top")); $(window).scroll(function() { $(".video").stop().animate({"top": $(window).scrollTop()+currentTop+"px"}, 500); }); and the div is set to position:absolute. But this works only in Firefox! (?) Where's the problem?
Datepicker text change color
Hello, I would like to be able to change the color of the text once a date has been selected from the calender. I currently have some placeholder text "dd/mm/yyyy" in a lighter grey, but when a date is selected from the calendar I would like the text to then display in the standard black text that most forms use. Currently if you type something into the textbox the text will display in the desired black, the only time it stays in the lighter grey is when the calendar is used to select a date.
how to use getElementbyId dynamically
Dear Sir, I am having code in ajax I am bringing id from ajax code is for text box id='textbox1"+i+"' the id is dynamically generating But how I ll use the same dynamically generated id in on of my jquery function using getElementbyid I not good in jquery. please help regards sanat
Disable Refresh in Webpage
Hi i'm developing a web page under JSP, mi problem is that i need to disable the web page refresh, but not only by pressing f5 or ctrl + r, but also the refresh button on any browser. Thank's for your answers!
document.ready() not called on navigating to UL elements
I am building a dynamic website in which, there is a UL of 500 elements. On clicking on any item in UL, it takes to next page. But my problem is that I have a document.getready() method in javascript embedded to new page. but this method is not being called while clicking on UL button. However after I click on UL button and new page appears and then I click refresh, it refreshes. so kindly assist on how I should tackle this.
Retrieve "latest images" of a twitter user ?
Hi there! I've already asked this on the twitter forum, but didn't really get a response there.. so I was wondering if anyone has experience with retrieving the latest twitter images of a user? (the so called "gallery" or "grid" = the images you see on the lefthandside of a user's page on twitter!) I can use the API & jquery without a problem.. It's just that it doesn't seem possible :( Perhaps someone can tell me more about it... Many thanks in advance for pointing me in the right direction ;)
how can i create a grid view using jquery or phonegap?
i want to display some list of alphabets in a grid view using jquery or phonegap,when i click on each alphabet it has to retrieve data from the database based on alphabet series..how can i do this?
Multiple divs headache
I have multiple divs hidden on the screen. When the user clicks a button, the corresponding div should appear. Here is what I have so far: http://jsfiddle.net/wa8W5/ I have also attached the whole project folder to this post. Any help?
how retain selected tab selected when page is postback
Hello sir, I'm new in jquery,i using your tab bar but when i click on button place in third tab then page is postback and fist tab is selected by default.But i need third tab remain selected until click on other one. Please provide solution. Thanks in Advance rajeev
jQuery/javascript doesn't have AND? Dropdown menu help please.
Hey, i'm trying to write an if statement for a dropdown menu so that the dropdown box only fades out when the cursor has left both the link(that originally triggered the fadeIn) and the dropdown box. The reason I'm doing this is because currently it sometimes flickers due to moving the cursor from the dropdown box back up to the link that triggered it. $("#game-link").mouseenter( function() { $("#dropdown-1").fadeIn(); }); $("#dropdown-1").mouseleave( function() { $("# dropdown -1").fadeOut(); });
W3C validation finds an error in the selector!?!
Is the a way to keep the W3C validation application from find an error in the selector syntax of a Jquery plugin. This can be seen here and going to the end of the page and clicking the W3C button. Strange! I did not think the validation checking went into Jquery's selectory syntax. Todd
selector efficiency for dynamic elements: use class or id?
What is the best way to set a click event on an element that is created at run time? Assume there is a dynamic list of items, each with a unique id, and all belonging to the same class. Ideally, I'd like to set the click event on the class, and have new elements belonging to that class automatically registered for the click event. Through testing, it appears that the class selector is used to enumerate elements, and that a specific click event is stored with each specific element. If that
Shorten line of code, please
Shorten line of code, please: var tip_form = $('a[class='+clase+'],span[class='+clase+'] ')
Re: add, insertBefore: Thought these were functionally equivilent, but no.
$(anchor).text(txt); $(links).append($("<span>"+ pretxt + "</span>")).append(anchor); works. this is the workaround code I ended up using. The following only shows pretxt, seemingly losing the original anchor node: t = anchor; anchor = $("<span>"+ pretxt + "</span>").insertBefore(t); $(links).append(anchor);(Using 'add' instead of 'insertBefore' in the above code procures the same result). What have I not understood? Also kinda irks me that the official jquery docs never tell me anything about the
"change" event on a select box causes problems when using the keyboard
Hi, I recently upgraded from jquery 1.4.2 to 1.7.2. It seems like the way the change event works for select elements in IE has changed. In jquery 1.4.2, if you are using a keyboard to move up and down in the select button options, the event is only fired when you hit the enter key while focused on an option. However in jquery 1.7.2 it seems like the event is fired as soon as you move to a different option, which makes the dropdown unusable if you are using a keyboard. I tried this in IE 7 and 9. In
Filter question
I have the following HTML: <!-- Beginning of slides --> <div id="slider-wrapper"> <div class="slider"> <img src="images/5587_120512_b.jpg" width="399" height="600" alt="Smokey Bear"/> </div> <div class="slider"> <img src="images/slide_8105.jpg" width="526" height="350" alt="Brids of Prey"/> </div> <div class="slider"> <img src="images/slide_8115.jpg" width="526" height="350" alt="Otter"/> </div> <!-- <p class="caption"
Problem with checkbox and form using jQuery
Hi all I'm currently developing a webapp that use google map api with some elements overlays on the map using checkbox to activate. I've tried to use jQuery to make iphone style checkbox however it won't work. When a check box is checked, it has the event onClick="SwitchLayer()". SwitchLayer() will search for all element in " document.forms[0].elements[i]" then print overlay elements on google map. However, when I add a tag that activate iphone style checkbox to one of my checkbox element,
vi
how to retrieve and display a data from database using jquery and ajax in a jsp without refreshing the whole page.......please help me out...in the database am having a table named "wall" with only one column "message".....now i want to display the comments in jsp using jquery method....
How do I position en element relative to the visible area of the page?
Hello, I have a <div> that I am positioning absolutely, which displays some content when the user clicks a button. At the moment, I position this using the "top" CSS proeprty, to put it 30 pixels from the top of the page. This is fine if the user hasn't scrolled the page, but if they have, they either only see the bottom of the <div>, or they may not see any of it. How do I position it to be 30 pixels below the top of the visible portion of the page? I've searched for ages, but not found anything
Changing a webpage for Ipad
I have a webpage that looks fine on a normal desktop, but it's also going to be used by Ipads. What is the best way to alter the page for the Ipad users? I was thinking that Jquery would be good for this to remove certain ID's and classes and replace them with Ipad specific, am I thinking along the correct lines and what is the best way for Jquery to know the page is been used on an ipad? I know I can use @media tag to change Css file is this suitable for jQuery as well? thanks for your thoughts
Job Opportunity: User Experience Designer
Greetings: I will shortly be starting a project to build a web application using the Yii PHP framework and jQuery, and I am looking for someone with a good background in building clean, elegant, and usable user interfaces utilizing appropriate CSS tools (possibly including Twitter's bootstrap) and AJAX through jQuery in Yii. Please PM me if interested; examples of past projects that give a good idea of design style and implementations would be appreciated. Right now, this would be a small design/consultation
Page Slide
I have a mobile Site www.loghos.org/ge/iphone I have no idea how I can make a slide gesture with one finger to move a site back. Thanks!!!
A little help please. I just need to find a jquery like this one
Hi everyone. Anyone know a jquery like the one on the right here: http://stocklogos.com/logo/tv-gift. That displays the logo on that elements (car, hat, t-shirt etc) A little help would be great. Thank you.
Jquery dropdown with images inside
Hi, Please help, I am in need of a dropdown box inside my web apps, which should contain only images. Similar to GMAIL CHAT smiley drop up menu... How I can do this !!! ? Thanks in advance. Suren
jQuery 1.7.2 is missing $.support.touch - what to use instead?
I decided to try jQuery Mobile 1.2 alpha1 with my jquery.mobile.iscrollview plugin. At the same time, I decided to try jQuery 1.7.2, since JQM 1.2 is now compatible. The plugin uses $.support.touch to know whether it should bind to touch events or not. Unfortunately, $support.touch was removed from jQuery 1.7.2. I realize that the documentation for $.support says not to rely on $support options sticking around in future versions - that it's really for internal use only, and when a feature detection
Repeat music x times
Is there a way we can play a particular music using JQuery n times. The 'n' being chosen by the user in another dropdown.
tbody.tr remove and empty leaves skeletal remains
I have a structure like table thead tr td td td tbody tr td td td I would be managing the trs in tbody dynamically. when i say tbody.tr remove or empty i still see the rows but only their values blanked out. How do you totally remove those rows so that tbody children can return 0?
Proper syntax to fadeOut form
I need to fadeOut a contact form once it is submitted and am having trouble figuring out the proper syntax in order to include it in the code below. I just replaced my validation with jQuery's validation function, and the code I was previously using to do this is: $("#contact ").fadeOut("fast", function ()); The current function to validate and submit the form using jQuery. $().ready(function () { // validate the comment form when it is submitted $("#contact").validate({
Datatables - Clear BStateSave
Hi, Can anyone help me with clearing BStateSave with the Datatables plugin? There's apparently help from bennybenben here but I cannot see how this should be written into my page. If anyone could put this into a simple one page, one table example that would be amazing!! Thanks Dvent247
Check if id is set in URL, if not, add it?
Hello all, I've built a single page site that uses div id tags in the URL and Jquery to handle navigation (index.php#home, index.php#about, etc.) Whenever the user visits index.php and clicks a link, it takes 2 clicks to make the navigation kick in; I believe this is because it's missing an ID tag. Once it's set to index.php#home, index.php#about, etc. it works fine. Is there anyway to check if an id is assigned in the url and if not, add #home to it?
"Refresh" event handler?
Hi! I'm trying to change an image class by clicking on it, like this: $('img.closed').click(function(){ alert('I`m closed'); $('img.closed').prop('class', 'open'); } $('img.open').click(function(){ alert('I`m open'); $('img.open').prop('class', 'closed'); } Although after a click I see my image with a new class, the old handler is still being called. Why is it happening and how can I avoid it?
Something screwd up between 1.6.2 and 1.7.2
Here's my code that works perfectly in 1.6.2 and fails in 1.7.2: var crappyHtml = " <span id='span__bk8100030023000300130003002300' isContentType='true' tabindex='-1' class='ms-entity-resolved' onmouseover='this.contentEditable=false;' onmouseout='this.contentEditable=true;' contentEditable='true' title=''><div style='display:none;' id='divEntityData' key='__bk8100030023000300130003002300' displaytext='020102-Цех 1 Новосибирск' isresolved='True' description=''><div data='<ArrayOfDictionaryEntry
Calling a jquery function on DOM load
Hi Everyone, I was wondering the correct way to call a function when the DOM loads. For example: $.fn.doThings = function() { ...do some stuff }; $(document).ready(doThings); Any help would be appreciated. Thanks
I've made a jQuery menu in JSfiddle but when pasting to Dreamweaver it doesn't work. Could it be some syntax error? Could it be that I´ve made a mistake?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="jquery-1.7.2.js"></script> <script type="text/javascript"> jQuery(function($) { $(document).ready(function() { $('#panelHandle').click(function() { jQuery.noConflict(); if ($('#sidePanel').offset().left < 0) { $('#sidePanel').stop(true,
substring() doesn't work
I want to delete the first 3 characters of my a element. I tried several opions, but none of them work: $('.ouder-item a').text().substring(3); $('.ouder-item a').html().substring(3); $('.ouder-item a').substring(3);I know that I call the right elemet, because the following works correctly: $('.ouder-item a').removeAttr('href'); Does somebody know why it is not working or what i'm doing wrong?
Dropdown accordian menu
Hi guys, I have an interesting problem. I've got a client who wants a different type of menu and although I've searched everwhere, I still haven't found a solution. So basically I need a 3 part menu. 1. Main menu is a dropdown that is activated when clicked and the sub-menu appears. 2. Sub-menu 3. Some of the sub-menu links need to be an accordian if they have sub-sub-menu links. Here is the code I have so far, although I've only managed to get the dropdown working, but it's not working properly
Submit Form when AJAX Call is done
Hello, i would like to do an API call when a form is submitted. The result should be stored as hidden input. My Problem is, that the form is submitted just before the ajax call is ready. Here are some simplified code snippets: $("#MyForm").submit(function(){ $.when( api_call() ).then( form_submit($(this)) ); console.log('Not Submitted'); return false; }); function api_call() { console.log('AJAX Call'); return $.ajax({ success: function(){ //
Next Page