jquery

Is it ineffecient to use a jQuery extension to create your HTML?

I have been using domec for awhile, and I was just wondering if plug-ins like these are much more inefficient then just using jQuery's built in methods. ...

Execute Ctrl+D on button click

I am trying to mimic key press events, for instance Ctrl+D on a button click. It would be great if someone can point me in the right direction on how to achieve the same. ...

Javascript/jquery not working on my site

I'm creating a site, tested out on my local server and it worked fine, but once I moved it over ot my host anything to do with javascript/jquery on the page just refuses to work :/ http://www.neuromanga.com/mangaReader1.0.php?cid=1 could someone please help me out ...

Fade a class in?

Hi, I've got a <td>. It has a class applied which specifies a background color. Can I fade-in to a different class, which just has a different background color? Something like: // css .class1 { background-color: red; } .class2 { background-color: green; } $('#mytd').addClass('green'); // <- animate this? Thanks ...

jQuery .not() method not working correctly

I'm trying to make all textareas remove default text on focus, except those of class "pre-fill". But the problem is the textareas of class "pre-fill" are still being selected and included. Suggestions on how to fix this? Thanks. jQuery(document).ready(function inputHide(){ $('textarea, input:text, input:password').not($('.pre-fill...

How can I fade out a class or background-image?

I'm playing with jQuery, and I want to fade out the logo. So basically, I want to have the animation fade out the logo first and then slowly shrink the header, so I can only see the id="nav" div. I tried using slideToggle, but it seems to just make my header div layer disappear rather than shrinking it to the header collapse. <div id="h...

Bug with combination of: jQuery 1.4, ajax/json, Firebug Lite and IE 8

I had just about concluded that jQuery's ajax calls wouldn't work with JSON data in IE 8, no matter what I tried. I found that I could use the jQuery 1.3.2 library and this fixed the problem, but 1.4 simply would not play ball with JSON ajax requests. Even when the JSON data returned was so simple that there was no question of it being...

jQuery For Loop with Post Not Counting Correctly

So, I have the following line of code, that does a for loop and subjects 12 on every loop. If I alert right before the post, it alerts the numbers as you would expect (72, 60, 48, 36, 24). But, with the alert inside the post it alerts the number 12 five times. Any idea why that is? Any idea where the number 12 is coming from? function l...

Coverflow with Javascript or Jquery

hi all, It been a long time that im searching on how can i create my own Coverflow effect with Javascript or Jquery. So if any one have an idea or can give a something releated with that, it will be great. Thnx ...

Where's the Tipsy plugin for jQuery?

I'm unable to find the download link for the Tipsy plugin http://onehackoranother.com/projects/jquery/tipsy/ The jQuery project page for the plugin (http://plugins.jquery.com/project/tipsy) does not have a download link. Am I not looking in the right place? ...

How do I track Fancybox clicks in Google Analytics?

I have a page with 24 links that each open up a .html file in a modal window with Fancybox, and each .html file has a video embedded in it. How do I track to see who is opening which videos? ...

Having a conflict while trying to use the jquery cycle plugin and the lightbox plugin

I am working on a website that has incorporated the jquery cycle plugin. It was all working fine until I tried to add the lightbox plugin. There seems to be an issue within the element that only allows the latter JS files to work. Any help would be great. Here is the jquery code I am using in the element. <script type="text/javascrip...

What is the difference between $('#___') and $('.___') in JQuery

I often see these 2 selectors, what is the difference? Thanks ...

How can I open a jumpmenu link in lightbox?

I have created a jQuery jumpmenu (using jQuerey Selectboxes) that opens a new window and it works great . One issue is that it can be blocked by a popup blocker so I would like to open the link with lightbox2 in drupal but still use the jumpmenu. Here is the jumpmenu in action: link text And here is the jQuery // $Id$ // Selectbox Jum...

jQuery UI checkbox button select all problem.

I am using this to check all checkboxes. <input type="checkbox" id="all" onclick="$('input[name*=\'selected\']').attr('checked', checked);" /> as long as I use the normal checkboxes everything works fine. When I convert all to jQuery UI checkboxes: http://jqueryui.com/demos/button/#checkbox They get checked -- but not in a visually -...

JSON & PHP - Building up the rows correctly

So I've got an object containing several rows from a database (using PHP). How should I organize them into an array to pass through JSON? For example, say I want to list some users. I've already done the correct query, and have an object called $u foreach($u as $user) { $rows['name'] = $user->firstname . $user->lastname; ...

Creating an Object with unique ID's

What I'm looking to do is create an object with unique ID's. To better explain here's an example: var obj = new Object({ 'a': { 'someVariable': 'heh', 'someOtherVariable': 'Stuff' }, 'c': { 'someVariable': 'heh', 'someOtherVariable': 'Stuff' } }); Thing is, the object is going to be used...

Simplest way to get current item index within jQuery template

I am passing an array of objects to jQuery template (official jquery-tmpl plugin): $("#itemTmpl").tmpl(items).appendTo("body"); <script id="itemTmpl" type="text/x-jquery-tmpl"> <div class="item">Name: ${name}, Index: ${???}</div> </script> What is the easiest way to display item index in the template? Preferably without using sep...

Open to suggestions for improving this basic jQuery

I've been playing with jQuery today, and I want to know if I can improve this. I noticed it is a bit slow and not as smooth too. Anyone know why? Test - http://twomuchwork.com/playground/ My jQuery /* View Toggle */ $(function(){ $("#hide-top").toggle( function() { $("#logo").fadeTo(1000,0,function(){ $("#logo").animate({'...

Jquery html() to div doesn't work

..I suppose because the html has script tags :-/ <script type="text/javascript"> $(document).ready(function() { $('.ad_slot').html('<scr'+'ipt type="text/javascript"><!-- amazon_ad_tag = "xxxxxxxx-xx"; amazon_ad_width = "160"; amazon_ad_height = "600"; //--></scr'+'ipt>'); }); </script> <div class="ad_slot"></div> witho...