Jump to content

JamieY

Members
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About JamieY

  • Rank
    Newbie
  1. Help with Jquery code to wrap elements

    Thank you. This does work
  2. Hello. I need some help with jquery. I have gotten very very close but can not for the life of me figure this out. I saw this code somewhere and thought it would work for me. It almost does but not completely. Here is my issue. I am building a WordPress website using a page builder. The page builder does not have the ability to make 100% rows. Therefore, all the content is centered. This site is being built in Bootstrap which does have the ability to do 100% rows. So, in the settings in the page builder, I can add a class to the row of "container-fluid" to get my 100% row which will hold a background or some parallax effect. Now, I need to get my cells to be wrapped with a div with the class of container in order to center them. My main issue with the jquery is that it has grabbed every cell with the class I assigned and put it into the same wrapper. I can't have that. So for example, I want to take this <div class="container-fluid"> <div class="panel-grid-cell"> <p>Some content</p> </div><!--END panel-grid-cell--> <div class="panel-grid-cell"> <p>Some content</p> </div><!--END panel-grid-cell--> <div class="panel-grid-cell"> <p>Some content</p> </div><!--END panel-grid-cell--> </div><!--END container-fluid--> and turn it into this <div class="container-fluid"> <div class="container"> <div class="panel-grid-cell"> <p>Some content</p> </div><!--END panel-grid-cell--> <div class="panel-grid-cell"> <p>Some content</p> </div><!--END panel-grid-cell--> <div class="panel-grid-cell"> <p>Some content</p> </div><!--END panel-grid-cell--> </div><!--eND container--> </div><!--END container-fluid--> <div class="container"> <div class="panel-grid-cell"> <p>Some content</p> </div><!--END panel-grid-cell--> <div class="panel-grid-cell"> <p>Some content</p> </div><!--END panel-grid-cell--> <div class="panel-grid-cell"> <p>Some content</p> </div><!--END panel-grid-cell--> </div><!--eND container--> So you see, the first chunk of code above has both the "container-fluid" and "container" class applied to it while the bottom chunk of code only has the class of container. Here is the jquery I have been working with //$(".panel-grid-cell").nextUntil(".stop").addBack().add(".stop") // .wrapAll("<div class='container'></div>"); I thought what I could do was add a class of "start" and "stop" to the the cells them selves to give the jquery a "Hook" to latch onto. So it would add the class "container" right above the first cell with the class of start and add the ending div below the last cell with the class of "Finish". This almost worked but I could not get my jquery correct. Can you help me write some code that would work?
  3. Help exporting xml

    Hello. Here is my problem that I really hope someone can help me solve. I work in the parts department at my company. On Monday, my boss is going to ask me to input a list of parts into a website that is going to take me about 4 hours to key in. It's about 400 or more lines of ten key that looks like this 1 123456-001 C14B23 5 123321-001-01 C1521 Repeat that with different numbers about 500 times. I found the website has an upload option so that I can import the parts. I know very little about XML. I got the company to send me an example upload file for the website. I have been playing with it for the last week and have had some success but mostly failure and I don't know why. I have been able to get a file to upload but that file will not save more than one record and will not upload more than one record. Most of the time when I try to export my file, I get an error from excel that says "Cannot save or export XML data. The XML maps in this workbook are not exportable. I took the example XML file they sent me as an example and opened it up in Visual Studio 2013. Then I went to the XML option and chose to save it as an XSD. I then open Excel, and choose the source button, click the XML maps button, load the xsd file that I just created from the XML file and then drag the fields on into the spreadsheet. This has both worked and failed for me. I don't know why it is that I have been able to get it to work and have not. My goal is to export the parts list from our database at work into an Excel sheet, import the XML template that I am trying to create and then copy and paste the parts. Export that as a parts list XML file and upload it to the website thereby saving me about 4 hours of typing. When I take the working example, import it into Excel, It automatically generates the map for me. I add a new line, and then try to export it and it won't. It fails. All the googling in the world has not taught me as to why. I don't understand the rules that Excel points to in order to fix this issue. I thought it had to do with repeating fields and that there needed to be 2 data sets but I can't figure out what that exactly means. I have attached my working example. Can someone please tell me how I can get this into a working spreadsheet template so that I can add rows for my import? Working-Example.xml
×