Faka isicelo sePhulo likaGoogle kuHlolisiso ngokuSebenzisa ngamandla i-jQuery

jquery

umhlobo UTodd Baker Ndithumele isisombululo nge Twitter Ngengxaki endingenalo ithuba lokuphuhlisa isisombululo. Kuba iibhlog zethu kwiCompendium ngamanye amaxesha zibanjwa kwindawo yesibini yomthengi, singathanda ukudlula Ikhowudi yokukhankanya kaGoogle Kwindawo yokuqala ukuze bakwazi ukulandelela iindwendwe ngokufanelekileyo.

Obunye ubunzima, nangona kunjalo, kukuqinisekisa ukuba iibhlog zakho zihlala zibandakanya ikhowudi yomkhankaso… into engalindelwanga. Isisombululo esifanelekileyo kuku Sebenzisa iJavaScript ukongeza ngamandla ikhowudi yomkhankaso xa iphepha lilayisha.

uxwebhu.ready (function () {
var campaignQueryString = '? {zalisa oku}';
Uqwalaselo lweDomain = '{gcwalisa oku ngaphakathi');
$ ("a [href = 'http: // www." + targetDomain + "]'") nganye (umsebenzi () {
le.href + = iphuloQueryString;
});
});

Esi sisombululo sithile sisebenzisa kwaye sifuna i-jQuery, isikhokelo somthombo ovulekileyo weJavaScript. Ndingu fan enkulu ye-jQuery ukongeza iziphumo ezintle kwiiwebhusayithi . Ndivile ingxelo yokuba abanye abaphuhlisi beshishini abakuxabisi ukuzama ukugcina uguqulelo, nangona kunjalo.

Ukuba usebenzisa le khowudi ingentla, kufuneka ubandakanye jQuery. Ndingacebisa ukuba uyilayishe kuGoogle. Kuba abantu abaninzi bayayenza le nto, iphepha lakho liya kulayisha ngokukhawuleza okukhulu kuba ikhowudi igciniwe, sele ilayishiwe ngaphambili.


UGoogle ubonelela nge Umakhi we-URL ukukubonisa ukuba uwakha njani umbuzo wakho wephulo. Ukuba ufuna ukuthanda ngokwenene, ndingacebisa ukongeza kwizinto ezinje ngamagama aphambili, iindidi, ababhali, njl.

enye izimvo

  1. 1

Ingaba ucinga ntoni?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda indlela idatha yakho yokubhaliweyo isetyenziswe ngayo.