jquery

jQuery core method overload

Hi to all, how can I overload or extend (or intercept) jQuery's .html() method so that it works its default way unless the object has a certain class? Thanks ...

jQuery: AJAX umlauts & special characters are a mess

I've just created my first ajax function with jQuery which actually works, but unfortunately the character encoding (for characters like ä, ö, ü, ß, č, ć, å, ø) is a nightmare. My files and my database are all UTF-8. I've tried a multitude of options in the ajax function and the PHP function, none of which were satisfactory. This is ...

jQuery and AJAX what should I use?

Hello, I've decided to go with jQuery for all my AJAX related client side needs. But jQuery has way too many functions for the same task: $.post, $.get, $.ajax, $.getJSON... My question is what should I use? EDIT: I'm going to use POST and JSON to connect to CodeIgniter PHP framework. Thank you. ...

WordPress jQuery Toggle based on category

I have the following Nav: <li id="categories"> <ul> <li class="cat-item cat-item-8 current-cat"><a href="#">Link</a> <ul> <li class="cat-item"><a href="#">Link</a></li> <li class="cat-item"><a href="#">Link</a></li> <li class="cat-item"><a href="#">Link</a></li> ...

jQuery - Do only once

I want to check if an element has the class .active, if it does add: margin-top: 4px; However I only want this to occur once, when the page loads, once the class has been detected dont detect it again and add the CSS style. This is class is applied when certain elements are hovered over. Is this possible in jQuery? ...

Notepad++ -like line-selecting in textarea with jquery?

Hey Is is possible to trigger a link to select a single line inside textarea. If it is, how? Martti Laine ...

Zend Framework appendFile not working after jQuery include

I'm setting a local path for jQuery in my layout. Then adding another js file using appendFile, but it's not adding the file I'm appending. in layout: $jquery=$this->jQuery(); $jquery->enable(); // enable jQuery Core Library $jquery->setLocalPath($this->baseUrl().'/js/jquery-1.3.2.min.js'); echo $jquery; echo $this->headScript(); In ...

setTimeout() not executing

I've got this simple function which displays a message to the user. If I add the timeout parameter it will slide back up automatically if not the user has to click it to get rid. But the timeout bit isn't working. function feedback(text, timeout){ $('#feedback').text(text).slideDown('fast'); $('#feedback').click(function(){ ...

How should I port this Prototype to JQuery?

There is currently this Prototype code that does a PUT: new Ajax.Request(someUrl, { method: 'put', parameters: { 'foo': bar }, onSuccess: function(response) { } .bind(this) }); I found this post but the solution uses an extra parameter supported by RoR, however I am targeting an ASP.NET backend. I searched a bit and found...

jquery problem mousenter & mouseleave

jquery script $(document).ready(function(){ $("#allbox").bind("mouseenter",function(){ $("#sslider").show("slide", { direction: "left" }, 1000); }).bind("mouseleave",function(){ $("#sslider").hide("slide", { direction: "left" }, 1000); }); }); html code: <div id="allbox" style="width:400px; height:100p...

Using jQuery for Effects

Ok - have been tasked with possibly an impossible (or at least a potentially nightmarish) scenario. Need to come as close as possible to reproducing PowerPoint-like effects via HTML/JavaScript (the spec is large and ugly, so I will spare you the details). Ultimately, I am looking for a solid launching point. I have used both Prototype/...

Whats the best way of using MVC + ajax (jquery) to load page content, aspx or ascx or both

I want to have a menu that when I click replaces the content of a "main" div with content from a mvc view. This works just fine if I use a .aspx page, but any master.page content is then doubled (like the and any css/js). If I do the same but uses a .ascx user control the content is loaded without the extras, but if any browser loads th...

jQuery accordion navigation with mouseover/mouseout

I'm trying to create an accordion navigation menu with the following properties: Hover over a parent LI, and its sub-menu slides down. If you mouse down to hover over the sub-menu, it stays open as you'd expect. If you move your cursor off of either the parent link or the sub-menu, the sub-menu slides up again. I thought I was getting...

Jquery .ajax async postback on C# UserControl

I'm working on adding a todo list to a project system and would like to have the todo creation trigger a async postback to update the database. I'd really like to host this in a usercontrol so I can drop the todo list onto a project page, task page or stand alone todo list page. Here's what I have. User Control "TodoList.ascx" which l...

jQuery flicker using .load

Hey guys, I'm using jQuery to dynamically load php pages into my page using the .load() function, so far this has been successful but if you click on various links to update the div with the .load() it starts to flicker between the new clicked page and the old one, this is pretty annoying and has anyone got a fix? Current code: $(docu...

Jquery if statement help

Hi. I want to know how to correctly write an if statement with jquery. I have a bunch of div's with an anchor in each that when clicked expands the the div's width using toggleClass. This works fine but I want to write an if statement that checks to see if the other div's have the same class applied, if so contract that div, then expand ...

Jqzoom not working on safari

Hello I am using jqzoom and it is working fine on all browser except safari there is an error "TypeError: Result of expression 'smallimagedata.pos' [undefined] is not an object." Please if somebody can help the page is http://www.legzskin.com/products.php?product=CHARMED when u mouseover the 3 images it should appear zoom window over t...

.animate question/help

So, I've built this navigation bar so far and I'm curious if it's even possible to achieve what I'm thinking. Currently, when you hover over each of the links they drop down (padding is increased). Now, what I'm curious in doing is if you hover over say "test1", test2-4 also drop with it but in the padding that has been created from the...

refresh parent window after closing thickbox window

I am using Thickbox 3.1 for a login form, using the iframe version. I want to close the iframe (child) window, then refresh the parent window. This closes the iframe window, but I need to somehow set it to refresh the parent window <a href="#" onclick="self.parent.tb_remove();">Close</a> Any help is appreciated. ...

jquery expanding menu+show/hide+multiple instances

Hi, I have 2 scripts working ok separately but can't get them working together - What I'm after is expanding menus where if the items exceed 10 a 'more' link appears that expands the list, which can also then be hidden. http://www.brianfitzer.ie/test2/ expanding menu is file test12.html toggle+limit: toggle is file test13.html (I...