jquery

JQuery Sortable and automatic scrolling

I am trying to get JQuery Sortable to work but I have run into a slight usability problem. The list that I am trying to sort is quite large (about 200 items). If the user tries to drag the top item right to the bottom, once the item reaches the bottom of the visible part of the screen, the page scrolls a tiny amount, then stops. To ...

refreshing content using jquery works only once

Hello! I am using this jquery function: $(function() { $("#refresh").click(function() { $("#category_dialog").load("<?php echo $category; ?>") }) }); i am using as well a link with the id="refresh" problem is it reloads the content only once, when i click it second time it doesnt refresh and i know there were changes made. T...

Strange jQuery issues together with FancyBox and Youtube!

Me and a friend did some trial and error yesterday about adding youtube support to FancyBox popup. The code is; jQuery(document).ready(function(){ jQuery("a.youtube").click(function() { jQuery.fancybox({ 'padding' : 0, 'autoScale' : false, 'transitionIn' : 'none', ...

Simple jQuery Contextual Menu Click Problem

I'm absolutely trying to steer clear of plugins for this, I want something lightweight and simple. This is as far as I have gotten on a contextual menu. I can click on the li.dd a and it reveals the ul, and when I click on it again it hides the ul. What it doesn't let me do is click on anchors in the ul. Instead of linking to that anchor...

Why won't styles render for my Jquery Boxy plugin?

Click "Rate" - that should pop up a normal boxy dialog, but styles aren't working. Any ideas? Here's the working example on the site: http://www.great-quotes.com/boxyTest.htm The official boxy docs: onehackoranother.com/projects/jquery/boxy/ .boxy-wrapper { position: absolute; } .boxy-wrapper.fixed { position: fixed; } /* Modal */ ...

Parsing JSON and customizing it for SIMILE's Timeline Widget

I have a valid JSON dataset: [ { "date": "2008-02-04 19:30:00", "authors": [ { "first_name": "Nassim Nicholas", "last_name": "Taleb" } ], "icon": "djlongnow_media/seminar_icons/salt-020080204-taleb.jpg", "slug": "the-future-has-always...

EVAL in jQuery, this is the correct way?

I need to call a jQuery function with EVAL (but I don't know how to do it), then I solve with this solution, but I don't think that this is the correct way... <script> jQuery.fn.customfunction = function (data) { alert( data ); } </script> <div id="eval_div"></div> <form><input role="button" myFunction="customfunction"/></form> <script...

$ not defined error in jquery

<script type= "text/javascript"> //<!CDATA[[ $(init); function init() { $("#heading").load("head.html"); $("#menu").load("menu.html"); $("#content1").load("story.html"); $("#content2").load("story2.html"); $("#footer").load("footer.html"); }; //]]> </script> ...

JQuery: Start object as hidden in a way that allows .fadeIn() to work

Hi all, I have an object that I want to start as hidden. I have tried to use each one of these styles one at a time. I have them in a class, not as inline styles. display:none; and opacity:0;filter:alpha(opacity=0); Now, these both worked obviously, the objects load hidden. The issue is that when I use these, the JQuery .fadeIn() f...

reload/set to default a particular html tag or id

How can I reload or set to default (using javascript or jquery) only a particular tag (or id) in my html page. For instance, if I want to set the following select option to default "selected", if something else is currently in selection, without reloading the entire page through javascript confirm() function as follows: var answer = con...

Jquery: possible to change the text selection color in a textarea with jquery? css doesn't work :(

textarea::selection { background:#0099ff;} That's how you specify a text selection color for chrome in CSS, i know it's different for different browsers but I wanted to know if there's a way to change the selection color inside of a textarea, because the code above wont work for chrome, now, in the code above if i changed textarea to p...

jQuery events not being called when triggering 'change' event via fireEvent.

Problem appears on IE7-8. Here is simple demonstration: <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"&gt;&lt;/script&gt; <script type="text/javascript"> // Selenium's trigger from scripts/htmlutils.js function triggerEvent(element, ev...

Calling my own function during with onClick

How do I call a user-define function such as this one using the onClick attribute of a input button? More specifically what special steps must I take in JQuery and what would the HTML markup look like? Thanks function simClick(keyCode) { var e = jQuery.Event("keypress"); e.keyCode = 8; $(document).tri...

PrototypeJS causes jQuery ui's slider widget to fail in IE8. Is there a workaround?

I am using jQuery UI's slider widget, and if the prototype js library is also included on the page, I find the following incorrect behavior in IE8 (other browsers are fine): While hovering over the handle, pressing and holding the mouse button causes the handle to immediately jump to the bottom of the slider. Attempting to drag does n...

jQuery table navigation using relative selectors only

Given a table such as the following: <tbody> <%foreach (var book in Model.Books) { %> <tr> <td> <%: book.Title %> </td> <td> <%= book.AuthorsToLinks("MyBooks/List") %> </td> <td> <%: book.Genre.GenreNam...

The correct way of using jQuery index() ; ? Its always returning -1

Not sure why this is happening. But everytime I do (elem).index(); , it always returns -1 . Why is that? How can I find the index of an object? ...

jQuery's Stylish-Select plugin doesn't work on elements created after page load

I've been striving to use Stylish Select Box with elements created after page load without success. In order to understand the issue, you'll need to re-produce it first. I know the following might seem a bit annoying but please continue reading if if you have 5 minutes of spare time. Alternatively, you may obtain a completed example her...

Embed open source libraries or plugins in a jQuery plugin

When building a jQuery plugin, do you think it's bad practice to embed the source of another plugin or library that it depends on? It seems to me that it's a better way to go than requiring users to do multiple <script src="..."> calls or compressing the multiple source files themselves. ...

Is there an error in this jquery file?

$(document).ready(function(){ /* fetch elements and stop form event */ var submitData = $("form.follow-form").submit(function (e) { /* stop event */ e.preventDefault(); /* "on request" */ $(this).find('i').addClass('active'); /* send ajax request */ $.ajax({ type: "...

Resolve conflicting jquery plugins: quicksand and lavalamp

I have a problem with jQuery Quicksand and jQuery Lavalamp plugins. It seems they conflict and don't work together. I wonder why and how can I solve this? I'm using jQuery 1.4.2 ...