已关闭

[jQuery] Adjust [login to view URL] snippet to generate a sorted output

The below code snippet outputs a list of divs ordered by index - the objective is to generate this list using the variable record.suspension_price

The snippet is the following:

[login to view URL]({

url: ajaxurl,

dataType: "json",

data: {

'action':'dealerselector_partnumber_ajax_request',

'products' : [login to view URL](','),

'brand' : brand,

'model' : model,

'type' : type,

'year' : year

},

success:function(data) {

// This outputs the result of the ajax request

var html = "";

[login to view URL](data, function(index, record){

html += '<div class="product"><div class="h3">' + record.post_title + '</div>' +

'<img class="packshot" src="' + record.suspension_image + '">' +

'<p>' + record.post_content + '</p>' +

'<p>'+foundproducts[record.suspension_partnumber].remarks+'</p>' +

'<span class="btn btn-attention" style="font-size: 24px;">&pound; ' + record.suspension_price + '</span>' +

'<p style="font-size: 12px; margin-top: 0; font-style: italic;">Adviesprijs hulpverenset incl. BTW, excl. montage</p>' +

'<a class="btn btn-next select-dealer-button" href="#selecteer-dealer2" onClick="[login to view URL](\''+ record.suspension_partnumber +'\', this); ">Wat kost montage?</a>' +

//'<a class="btn btn-next select-mail-button" href="#selecteer-dealer2" onClick="[login to view URL](\''+ record.suspension_partnumber +'\', this); ">E-mail deze gegevens</a>' +

'</div>';

});

[login to view URL]().html(html);

},

error: function(errorThrown){

[login to view URL](errorThrown);

}

});

}

Full .js file attached

技能: jQuery / Prototype, Javascript

查看更多: jquery selector, jquery create element, jquery list, how to set function in jquery, jquery append, jquery array, jquery find, jquery function(), jquery show content, generate sorted country list vbnet, pull data xml file generate possible output, jquery change content depending time, jquery expanding content plus minus signs, jquery drag content manage, jquery show content script, jquery pop content box, accordion jquery empty content, generate excel output macro, generate webform output excel, jquery scrolling content

关于此雇主:
( 3个评论 ) Worcester, United Kingdom

项目ID: #24592899

5 威客就此工作平均出价 £23

talentedexpert57

Hi I am ready to fix issue of your website. contact me to discuss more, so that we start right now. I am web mobile developer and i have 7 years experience in this side. Moreover,You don't have to pay anything advance 更多

£15 GBP 在7天内
(1条评论)
1.5
Hyunga

Hi there. Nice to meet you. I'm a Javascript expert and FULL Time Developer. I have checked your requirements carefully. I have rich experience in Javascript, PHP, Html, CSS, JS UI design, etc. I can start work i 更多

£18GBP 在1天里
(1条评论)
0.8
Muschket

Hello, I interested in your current project. As a honest web developer, I have rich experience of web developing for 8 years over with Jquery. Upon reviewed your description the project seems perfect match for my exper 更多

£50 GBP 在2天内
(1条评论)
0.4
Abdulrahim03

Hi, I can get this Jquery task done for you. Are you available to have a chat because I have got a few concerns. Regards

£15 GBP 在7天内
(0条评论)
0.0
udzlmz

Hey there. I see what problem is. I am a senior javascript and jquery developer, so I can fix it in 30 minutes. Please contact me and fix it right now. Thankx.

£15GBP 在1天里
(0条评论)
0.0