On some of my pages I want Superfish (menu plugin) to unfold one of the first level options by default as soon as the page opens. I attributed this option ul an id="me", and trying to implement "onInit" function, but it does not work. Could someone please look? Thanks.
jQuery(function(){
jQuery('ul.sf-menu').superfish({
onInit: functio...
for example, if I have:
var $target = $("div#target");
and then, I would like to pass this jquery object $target to another javascript function I defined myself, like:
function f(xml, $div_t)
{
}
inside the function f, is there someway I can retrieve the original div's ID from the object $div_t?
...
I'm trying to create a filterable portfolio using a jquery slider, using easySlider and code I have adapted from various tutorials. The portfolio items are rendered as an unordered list, and shown or hidden based on their css class. I've managed to get this part working properly, but I can't work out what to do about the slider. It no lo...
Both of the below functions (which are identical except for when they should run) are in $(document).ready. The .live version works as expected, hiding 2 divs when the selector is checked and showing them when it is unchecked. The .ready version does nothing but it is supposed to hide the specified divs when the page is loaded. The chec...
This function below works in static pages but in dynamic pages it doesn't work correctly, it executes both functions when clicked the first time.
and when tested with firebug (or jsenav ) it does work correctly
$(document).ready(function() {
$(".toggleShipingSched").toggle(function(){
$(this).html("close schedule").addClass("op...
Hi everyone,
I'm using the Ajax.Actionlink from the MVC framework and everything works fine with my targets and partial views. However I've seen that the html output doesn't add the "id" attribute to the resulting tag.
Is there any way how I can add it?
Thanks in advance
...
Hi all, I'm using the jQuery multi-file upload plugin found here:
http://www.fyneworks.com/jquery/multiple-file-upload/
I don't see in any of the examples though a way to "reset" the file-picker,
clearing out any currently selected items.
Any one know how to do this?
Thanks!
...
I can't seem to get this code to work.
How do I get the closest value of .abc when the button is clicked?
Defining Closest
ie: if you click the button where "A:" is at I want a value of 10.
if you click the button listed in "B:" I want the value of 20.
Here is the code:
<script type="text/javascript">
$(function(){
$('.test').click...
I'm pretty sure it's an obvious error somewhere on this - but let me explain what I'm donig :
I'm calling a PHP file via jQuery as follows :
$.getJSON("/phpincs/getbucket.php?awskey="+awskey+"&awssecret="+awssecret+"&bucket="+bucket,
function(json){
$.each(json,function(i,item){
$(new Option(item.name,item.name)).appendTo...
i have this code:
$('#categories').change(function() {
var myCars = new Array("Saab", "Volvo", "BMW");
addRowToTable(this.value, myCars);
$('#listings').hide();
});
but i dont want it to call the addRowToTable method if the user selects the first item because the first element says "Plea...
hi all,
i made a button widget in jQuery which displays an icon.
now when i set the button do disabled, i'd like to have it greyed-out.
is there a jQery function to do this?
thx
...
got this code:
$('#hotels').jqGrid({
url : base_url + 'administrator/ajaxhotel',
datatype : 'json',
mtype : 'GET',
colNames : ['Hotel ID' , 'Hotel Name', 'Hotel Location','Type', 'Status', 'Active', 'Date Added'],
colModel : [
{name: 'id', index: 'id'},
{name: 'name', index : 'name', edi...
Hello,
i have this and a simple question to it.
$.ajax({
type: "POST",
url: "/",
data: $(".form").serialize(),
dataType: "html",
success: function(data) {
$("#id").html(data);
}
});
Inside "data" is some html I am inserting into the DOM. Thats no problem. But I want to manipulate the "data" before doing so. How ...
Hi,
What I need is very simple but, searching the web, I didn't find any example.
I am using the jqModal jQuery plugin for displaying content dynamically (via Ajax) in a modal dialog. Once, this modal content is loaded, I need to bind some event on the dialog DOM elements. Therefore, I would like to assign an handler to the "success" A...
Hi,
I'm trying to set the wordpress posting form to multipart/form-data for a custom write panel. I am attempting to use JQuery but can't seem to get it to work.
jQuery(document).ready(function(){
jQuery('form#post').attr('enctype','multipart/form-data');
jQuery('form#post').attr('encoding','multipart/form-data');
});
This is...
Hello,
I have an issue with javascript/jQuery...I have a web service that will process information from a list from the client. What I want to do is have the client send the data piece by piece allowing the web service to do its job without being overloaded. Also I am using a jQuery UI progressbar which will allow the user to see the pr...
I have a javascript function I'm writing which is being used to include an external JS file, but only once. The reason I need such a function is because it is being called when some content is loaded via AJAX and I need to run page-specific code to that content (no, just using .live won't cover it).
Here's my attempt, shortened for brev...
MAIN WINDOW
// some javascript
//some html
//here ajax-call to load all divs
//all divs hidden by default
//based on user choice(from select option), show selected group of divs
//click any shown div to call corresponding popup
POPUP WINDOW
//edit contents of that div.
//on close i need
1. refresh main window to load all divs
2. sele...
I'm currently using TinyMCE and would like to add a custom button that works as follows:
User highlights text in the text-editior
User clicks the custom button X
The text (dog walking) is wrapped with a tag (dog walking)
Any ideas on if this can be done? I've figured out how to make a custom button inject text, but not wrap text... H...
Hi all:
Is there a way to find out the id of the IE window that generates alert boxes? I assume it is the document or window itself.
Either simple html or jQuery can be used.
I tried something like:
var id = $(this).parent().attr('id');
but to no avail.
Ultimately I want to find out the ID of the window/document which generates j...