success: function(msg) { //do something with the sorted data alert("Your itemshave been re-ordered");
} }); } });
The code sorts the items and it updates the database using the id. But I
want to send an additional variable of the category ID in the post I
can use in my PHP. Here is the HTML where I can drag and reorder. The variable i want to sent is $pr['cat_id'].'
I have this ecommerce store and it displays each product in a box with equal heights using jQuery. I tried to apply the same code to another display of products and cannot get it to set the height on the divs. It is supposed to append the style min-height to the divs. I examined it in firebug. Do you see anything below that may be written a better way?
var make_equal_height = function (element) { var $within = jQuery(element), selector = $within.attr('data-equal-height'), $children = jQuery(selector, $within), tallest = 0;
$children.each( function() { var $this = jQuery(this);
$this.css('min-height', ''); var h = $this.height();
I have this code that collapses and expands the menu items. First I
installed the jQuery cookie plugin. Now I need to save the value in a
cookie of the top level category that is clicked.
$(this).toggleClass("CatExpanded").siblings(".CatExpander").toggle();//toggles
the +
$(this).toggleClass("CatExpanded").siblings("ul").slideToggle(500);
I have this unordered list. It has a + sign to collapse the list. I want
to still display the + yet be able to click on the link instead. How can
I change this?
In my prevous posts I was working on a chained select boxes with three
options. I have that working. I have a small form that gives option for
category, watts and lamp. I know the purpose of Ajax is so you don't
have to refresh the URL. Is it possible now I have the variables, I can
pass them to another URL?
Working on these chained select boxes. I have three. Category, Watt, and
Lamp. I am trying to get the last select box to change after the second
one is selected. I am getting mixed up with the closing brackets and
causes the first two to not work. At this point I wast just trying to
get it to say "wait" or send an alert message. This is what I have.
I am working on this chained drop down that once selected it will
poplulate the second. My major issue was sending the ID. Becuase I was
using Wordpress it didn't know how to send it. I made a test function to
get the Ajax URL working. All it does now is show an alert "Hello
World". I want to remove the line to "Hello World" and
replace it with posting ID.
<script
type="text/javascript"> jQuery(document).ready(function()
{ var id = $("select#category
option:selected").attr('value');
$("select#category").change(function(){
jQuery.ajax({
type:
'POST',
url:
ajaxurl,
data: {"action": "hello"},//Just shows the
result of hello
function
success: function(data){alert(data);}//Need to remove
//jQuery.post( ajaxurl , {
action:"my_action_name",id:"True" }
,function(data){ //This is what I found I need to work into my
script. But not sure of the format.
This code I am using on a ecommerce site. It updates the input field for the quantity. It works in Firefox but not IE. Is there anything I can change to get it to work?