Created
July 24, 2012 14:38
-
-
Save adjohu/3170299 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//var formContainer = $("#ctl00_ContentPlaceHolder1_ffnpPayBrasPag1_dvBPCC"); | |
var findPrev = function (node, needle) { | |
var found = false; | |
do { | |
node = node.previousSibling; | |
var nv = node.nodeValue; | |
if (nv && nv.indexOf(needle) > -1) { | |
found = true; | |
} | |
} while (!found); | |
return node; | |
}; | |
var addBrBefore = function (node) { | |
var new_br = document.createElement("br"); | |
node.parentNode.insertBefore(new_br, node); | |
}; | |
var form = document.getElementById("ctl00_ContentPlaceHolder1_ffnpPayBrasPag1_dvBPCC"); | |
var h1 = form.childNodes[1]; | |
var select = document.getElementById("ctl00_ContentPlaceHolder1_ffnpPayBrasPag1_ddParcelamento"); | |
var label = findPrev(select, "Número de Parcelas"); | |
addBrBefore(h1.nextSibling); | |
form.insertBefore(select, h1.nextSibling); | |
addBrBefore(h1.nextSibling); | |
form.insertBefore(label, h1.nextSibling); | |
addBrBefore(h1.nextSibling); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment