jquery

Tinymce and printing with page breaks

I have written an application that uses the Tinymce editor. The administrator can create templates, which are then subsequenty loaded by the users. Between fetching the template from the database and inserting it into the editor, I perform a merge with the current record. This all works fine. I am however having problems with the printi...

My jQuery and PHP give different results on the same thing?

Hey all, Annoying brain numbing problem. I have two functions to check the length of a string (primarily, the js one truncates as well) heres the one in Javascript: $('textarea#itemdescription').keyup(function() { var charLength = $(this).val().length; // Displays count $('span#charCount').css({'color':'#666'}); $('sp...

DOM Elements with same id and jQuery

Hi I have multiple elements with the same structure in my application. Second div element's id varies as per the comment id in the db which is unique. There are elements with the id 'vote_up' and 'vote_down'. This gets repeated for each comment.What happens is that, as I mentioned, there are multiple comments. I want to perform an Ajax r...

jQuery overlay not working in IE6, Opera

Hi, I've been scratching my head for hours trying to figure this out. I have this page: http://173.203.72.190/default.aspx. On clicking 'Any Cuisine', a sort of overlay is supposed to open. It works fine in nearly all browsers except IE6 and Opera. In IE6 and Opera, the jQuery 'overlay' won't open. Anybody have any ideas why this mi...

how to create an function using jquery live? [Solved]

Hey all i am trying to create a function that well keep the user in lightbox images while he adds to cart, for a demo you can visit secure.sabayafrah.com username: mahmud password: mahmud when you click at any image it well enlarge using lightbox v2, so when the user clicks at the image add, it well refresh the page, when i asked abou...

Java scripts conflict on my home page

<script type="text/javascript" src="jquery-1.js"></script> <script type="text/javascript" src="mootools.js"></script> <script type="text/javascript" src="slideshow.js"></script> <script type="text/javascript"> //<![CDATA[ window.addEvent('domready', function(){ var data = { '1.jpg': { caption: 'Volcano Asención in Omete...

How do you find the balance between Javascript (jQuery) and code behind in ASP.NET.

Stackoverflow members, How do you currently find the balance between javascript and code behind. I have recently come across some extremely bad (in my eyes) legacy code that lends itself to chaos (someHugeJavafile.js) which contains a lot of the logic used in many of the pages. Let's say for example that you have a Form that you need to...

dynamically embedding youtube videos with jquery

Hello all, I'm trying to retrieve a listing of a user's youtube videos and embed them in a page using jQuery. My code looks something like this: $(document).ready(function() { //some variables var fl_obj_template = $('<object width="260" height="140">' + '<param name="movie" value=""></param...

jQuery UI datepicker customization

I have the jQuery datepicker working, but I need to be able to select more than just dates. I need to be able to select between some strings as well "Yesterday" and "Today" to be precise. So, the underlying input can contain any date as well as the strings "Yesterday" or "Today". Is there some way I can do this by tweaking the existing...

Use jquery to keep adding numbers to a variable on click

I'd like to know how to keep adding number to a varible. For instance the number starts at 0 then every time you click the button it adds 20. So the first click would change the variable to 20 then the next click 40. This is as far as I can get.. var n = 0; $('#button).live('click', function() { newval = n+20; $('.number').appen...

How to get a value from a JSON hash

In a jquery ajax call I get sent back some JSON from the server and want to use some of it in the success callback. I pass in the data, but how do I get at a specific value (say "id")? I tried this but I get undefined: success : function(data) { alert(data["id"]); ...

jQuery, javascript, and IE8..

OK, simple: self = $(this); Throws a JavaScript error in IE8 when it's inside an event handler. It works in every other browser. var self = $(this); Throws no error. Why? ...

In jQuery, can you get the "target" opacity of an element that is fading?

I'd like to somehow get the target opacity (the final value it is being animated to) of an element that is fading. For example... $('body').fadeTo(0.4); // 0.4 $('body').fadeIn(); // 1 $('body').fadeOut(); // 0 $('body').animate({ opacity: 0.7 }); // 0.7 Is this doable in jQuery? Update For some background, see my answer here on St...

Drupal: reset user password from administrator

Howdy. I have a client who's webpage I'm building, wants a page where all users are listed with a function to send the users password to the users email for each user listed. I tried doing this by using a jquery post: $.post("/user/password", {name:"user.email@domain,com", form_build_id:"form-XXX", op:'', form_id:"user_pass"}, functio...

problem with '/' in the REST URL parameters for an Ajax call

var url = relativeURI+'/rest/PPS/Prod/'+encodeURIComponent(prod)+'/Section/'+encodeURIComponent(section); $j.ajax({ url: url, type: 'POST', error: function(){ alert('Error'); }, success: function(){ alert('ItWorks'); } }); } In this ajax call, if I have '/' in the parameters prod or sec, then there is an erro...

jQuery can't access elements loaded through AJAX

I have a little application written in PHP. The front-end uses jQuery and AJAX. At one point, jQuery loads some content in through AJAX. The problem is, it can't then access any of the elements it just loaded. Anyone know why? Thanks in advance! ...

jQuery Cycle slide count

Im currently using a plugin called Cycle for jQuery and would like to tweak a small piece of functionality but don't really know how. I made an example which can be viewed here on jsbin. The issue that I am having is with the actual slide "counter." The way that its currently configured, the current slide that it is on does not updat...

Bind a jquery function to elements

Hi there, I am very new to jquery and need some help. I am trying to change a css element when I enter a textbox. I have applied a css class to my textboxes and I have a couple of div tags around my textboxes. When a user selects the textbox I want to change the desired div tag. This is how the html looks <div class="left"> <div ...

remove text from a function (i think)

I am trying to remove the "_" in the "change_option". I managed to add the class ok but that's it <select onchange="change_option('SELECT___100E___7',this.options[this.selectedIndex].value)" name="SELECT___100E___7" class="link_fix3"> Here is the code I have so far... $("form select[onchange^='change_option']") .addClass('link_fi...

jquery to grab link and text based on class

Hi all, I'm trying to use jquery to grab the entire link depending on it's class. Here's my code: <ul class="vm_catTigra"> <li><a class="mainlevel" href="/index.php&amp;category_id=6">AAAAA</a></li> <li><a class="mainlevel" href="/index.php&amp;category_id=10">BBBBB</a></li> <li><a class="sublevel" href="/index.php&amp;category...