I want to put a function call in my pages called enableTinyMCE(); In that function I want to see if there are any textarea's in my page and if so do the tinyMCE.init() function. How do I detect if there are any textarea elements in the page?
...
Hello,
Am wondering how to post an array using $.ajax. My array is something like this:
var a = new Array();
a['test'] = 1;
a['test2'] = 2;
and so on...
I tried:
$.ajax({
url: baseUrl+"chat.php",
data: { vars: a},
type: 'post',
success: function(data) {
alert(data);
}});
Any suggestions? Thank you for your time.
...
Is this bad practice to use php statements such as 'if' within a jquery function?
should I really just be writing loads more functions instead of limiting a few using php? it seems to work fine but was wondering if this is a major faux pax?
example:
this is a code snippet, basically if the php variable $url is equal to 'projects' then...
I'm using blueprint to do a complex form layout that involves jquery-ui tabs, but when I try to use the blueprint span-x divs within the jquery-ui tabs, the formatting gets all screwy....
<div id="tabs">
<ul>
<li><a href="#blahblah"><span>blah blah</span></a></li>
<li><a href="#blahblahblah"><span>blah blah blah</span></a></li...
Hi,
I have 3 radio buttons with attached callback:
$('#formBuilding input[type="radio"]').change(projectChangeHandler);
In callback projectChangeHandler I access radio value with:
var currentSelection = $('#formBuilding input:radio:checked').val()
In IE 7, unlike to other browsers, currentSelection has value from radiobutton whic...
I'm having a hard time working out a design pattern in Jquery to control multiple AJAX and Animations. I of course have the AJAX and Animations bound to some events like 'click' but I'm trying to keep the code modular with functions and adding wrapper methods ($.fn), but I don't know how to get code to run when a function or a wrapper m...
var valueAsText = $('#counts span').text();
i use this tiny script to parse a span that contains the value 10, but i got this value instead 100000000000
can someone tell me what is wrong?
and here is the code:
<div id="counts"> <span>10</span> </div>
thanks.
...
In looking up jquery examples, I see that authors tend to go with ' or " to enclose, selectors, for example.
As in:
$('#tags').click ...
or
$("#tags").click
Is this a personal style thing, or is there a reason why one is better than the other?
In my brief experience, I find that ' is faster to type. Also, building up json paramete...
hey there,
i just tried the jQuery Form plugin with the code example from http://malsup.com/jquery/form/#code-samples
it actually shows the Request (beforeSubmit), but it doesnt catch the response (success). It opens the response in the current window, as the browser would do a regular form submit. (response is plaintext).
any ideas?
...
I have two elements that shouldn't be active at the same time, so when one is toggled I fade the other out, however I would like to be able to fade the open element out and then bring the other one in. Is there a way to do this that isn't a hack?
<script ="text/javascript">
$(function() {
$('#jlogin').click(function() {
$('#login')....
When I make a jquery ajax call to auto fill a dropdown on page load the dropdown control is cut off by the containing table. I understand that if set the table width to 100% it would fix this but in my case I cannot do that. This code works fine in FF. It's almost like IE won't "re-render" the page after the ajax call completes. Here's t...
I'm using ASP.NET 3.5 + Ajax Control Toolkit + jQuery (NO MVC yet)
I'm looking for a standard solution for showing a user control (.ascx) as a modal popup (like the Ajax Control Toolkit ModalPopupExtender implementation), where I can pass parameters to it before it opens. Then get some values on closing, and potentially handle events on...
I saw comments in a previous question saying that it is best to use Prototype with Rails. However, my own experience is that Jquery is a superior Javascript library. Being new to Rails, I have not yet investigated how to use Jquery with Rails but I assumed this would work. Is it correct that this may be a problematic combination - especi...
i am having difficulty making my jquery functions operate within wordpress.
can anyone help out with why these should work normally but not in wordpress???
...
I am using ASP.NET 3.5 with MasterPages. My master page has the script references to jquery and jquery UI. My web page that uses the master page has a script reference for a custom javascript file for that page. This javascript file has jquery calls in it (i.e. document.ready --> set up input boxes as calendars).
When I run the websi...
I Using this code
<script type="text/javascript">
$(function() {
$('#DoTask').click(function(event) {
event.preventDefault(); // added this
$.getJSON('/TareasBackGround/DoTaskInteractivo', null,
function(response) {
$('#ResultadoEjecutarTarea').html("<br />Resutado:" + response.res...
This is what I currently have:
// #content is visibility=hidden
sIFR.replace(mix_bold, {
selector: '#content p',
onReplacement: function(fi) {
$('#content').fadeIn("slow");
}
});
The fade in happens, but for a split second the replaced flash movie appears before being hidden. Has anyone gotten this to work? I am using jQuery...
I have a string 12345.00 would like it to return 12345.0
I have looked at trim but looks only to trim whitespace and slice which I don't see how this would work. Any suggs?
...
Hi,
I'm trying to implement a generic way of adding remote validation to xVal / jquery.validate
There are only two unsolved questions left:
How do I "manually" mark a form element as invalid and add an error message to it from my own javascript code?
How do I remove remove the error message at a later time without removing any other...
Linq has a convenient operator method called Take() to return a given number of elements in anything that implements IEnumerable. Is there anything similar in jQuery for working with arrays?
...