I'm building a mega menu where I want to be able to trigger the menu via both a hover (using the mouse) and focus (such as tabbing to it via the keyboard).
This is what I'm presently doing:
$(".megaMenu-trigger").focus(function (){$(this).hover()});
$(".megaMenu-trigger").hover(function(){
// do the stuff
});
This works, but am w...
Hi,
I'm having a problem with the jQuery hide() and show() methods. Below is a snippet from a project I'm currently working on. This code comes from a multi-page form which is loaded in it's entirety, then jQuery is used to show and hide the various pages. I should metion that this technique works in every broswer except IE7.
//Hide al...
hi im not sure where to start on this as events and their handlers is my weakest point in programming.
...
setInterval(function(){
//code goes here
},1000);
as we know this runs in an infinite/loop
my question is if the code inside the function takes longer than one second (e.g: 5 seconds) to finish does the interval on the 2nd,3r...
Basically I hide all of the answer divs on the page, but I want to show a div if the a user has clicked a bookmarked link to it.
Here's the javascript code
<script type="text/javascript">
$(document).ready(function(){
//hide the all of the element with class msg_body
$(".faq_answer").hide();
//toggle the com...
I am building a system where the user builds their own navigation system, the process is when the user visits the site there is a llist of available topics they can select slect a top creates and accordion that holds all that topics content, clicking the topic again should remove the top, currently I have this code, but it does not work,...
The below code works to only allow alphanumerics and spaces. However, I would like to also allow an accented character (Ã). How should the regex be modified?
Thanks
<html>
<head>
<script type='text/javascript' src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/JavaScript">
$(fun...
I am using the superfish menu and also a jquery slideshow on the same page.
For some reason they aren't playing together nicely, I have no idea why.
If you mouse over the links at the top there should be a fade effect for the sub menu items.
I've uploaded a file so you can see how the menu doesn't work.
http://www.wilwaldon.com/jqu...
I am trying to use asp.net MVC controllers JsonResult to CRUD db records.
e.g.
GET /Config/Folder/1 - will return a json serialized LinqToSql entity
POST /Config/Folder - will send form data back to the server to be deserialized and persisted back to the database.
I am using james newton-kings JSON.net to serialize the entity, althou...
i'm trying to make a script using Yahoo's YQL in a web applicaion. The script looks over a text paragraph and then it finds some references and appends on the text as a popup. It all goes fine until I have to loop through each reference with class "verso", after getting my response it appends all the references in the last element of the...
I have two time values on a page:
8:00
22:30
I need to subtract 8 from 22:30 and get 14:30.
Is there a straight forward way to do that in jQuery? Plug-ins are fine by me if they're necessary.
Update:
The second number is a grand total so it could also be something like
48:45
Anything I subtract from it should just subtract the ...
Hi,
I have a select dropdown with id's mapped to values.
On the onChange event I want to redirect to the same url but with 'id=value' appended to the querystring.
How do I check that this 'id' option isn't already in the querystring (I don't want multiple values) and replace / append as necessary.
How do I check if '?' is already in...
I am trying to refresh a page after an AJAX method call (admitedly, this rather defeats the purpose of the AJAX method) - but I am coming up against a hard deadline, and I need to complete development, and I am fairly new at using jQuery.
I have a table that displays checkboxes on the left had side. A user can select one or more check b...
Hey guys,
So, I have a navigation that is a list and has sublists and sublists.
Basically, the nav is by default collapsed, but if people click on a page that's in a sublist, I want to show the parent list. And if it's a sublist of a sublist, I need both parent lists to show. I have it set up, but, I don't like putting 5 .parent().pare...
I am building a new site which will consist of a mix of dynamic and static pages.
I would like to add commenting functionality to those pages with as little work as possible. I'm curious as to whether such a solution exists in PHP.
The ideal set of features would be:
Completely independent from the surrounding page / site: PHP code g...
I've been working with these 2 Jquery files for a while, trying to debug them but I can't figure out why they don't work together.
Any advice would be awesome and greatly appreciated.
Thank you in advance!
========START JS#1=====================
window.onerror=function(desc,page,line,chr){
/* alert('JavaScript error occurred! \n'
...
How to insert an image after the input field when using jQuery datepicker?
I expect to use the function: buttonImage.
My jQuery code:
jQuery('.datepicker').datepicker({
buttonImageOnly: true,
buttonImage: 'http://finansraadet.opengate.dk/images/arrowH3.gif',
// dayNamesMin: ['man', 'tir', 'ons'...
I refer to Phil Haack's "Undoable" article found here: http://haacked.com/archive/2010/01/01/jquery-undoable-plugin.aspx
I've copied the exact mark-up for the table from the tables demo page, included JQuery 1.3.2 min, and copied the exact script block used on the demo page but when it gets to this bit:
$('a.delete').undoable({
inline...
Imagine you have a button like this:
<input name="myButton" type="button" value="button" onclick="return test();" >
where the test functions is as follows:
function test(){
// do something
return true; // based on some logic return boolean
}
Now let's say,I don't know what is set for the onclick event, and at runtime I need to ...
Hi there,
I am appending HTML into the DOM via jquery.append - my script is as follows (please excuse the crappy code)
myDiv = $("<div class='bottomright' title="+msgID+">"+msgTitle+msgContent+
"</div>").appendTo(document.body).fadeOut(0).slideDown('fast');
shown.push(msgID);
is there a different way to address either the hover or th...
<label for="AddList" class="locType">Select a location</label>
<select id="AddList">
<option value="New">New Address...</option>
</select>
The Js.
$(document).ready(function() {
//Location Code
$("#AddList").change(function() {
var str = "";
$("#AddList option:selected").each(function() {
str +...